I hope this isnt too trivial to post to the list but im wondering how to change my rule to capture nested quotes? STRING_LITERAL: '\'' .* '\''; A string can be anything enclosed in single quotes. However I also need to cater for a nested double quote. Eg: 'this string has a '' in it.' Rgs, James.