[TxMt] Re: Troubles matching " and ' in language grammar

Hans-Jörg Bibiko bibiko at eva.mpg.de
Mon Sep 1 21:37:50 UTC 2008


On 01.09.2008, at 22:38, Charles Turner wrote:
> Hi all-
> &a &B &!
> 'c' 'D' '!'
> "e" "F" "@"
> ^G ^h ^+
>
> within the match field of a language grammar.
>
> If I use the search dialog box, this regexp will work for characters
> enclosed in single apostrophes:
>
> ((?<=^)|(?<=\s))(([&^]\S)|(\'\S\'))(?=\s)
>
> But it doesn't work when I get it into the match field, I suspect
> because of the framing apostrophes, as in:
>
> {	name = 'constant.character.forth';
> 	match = '((?<=^)|(?<=\s))(([&^]\S)|(\'\S\'))(?=\s)';
> },
>
> Any ideas about what I'm doing wrong, or how I can solve my trouble?

Maybe this could help:
E.g.  ("|\x{27}) for " or '

27 is the hex code for a '

--Hans



More information about the textmate mailing list