From: Reimer Behrends Date: 2002-09-07T14:21:19+09:00 Subject: Re: SciTE/VIM Syntax highlighting Jim Bartlett (jimbart@magma.ca) wrote: > I am learning Ruby via "Programming Ruby: A Pragmatic Programmer's Guide". > In one example, a regex is made with an apostrophe as part of the pattern. > > aPhrase.scan /\w[-\w']+/ Use one of the following alternatives: aPhrase.scan %r/\w[-\w']+/ aPhrase.scan(/\w[-\w']+/) Either of them should make syntax highlighting work with Vim (don't know about SciTE). The general problem is that it is non-trivial to distinguish between / as the first character of a regular expression and / as the division operator simply from local context. Therefore, a heuristic is needed. And obviously, any heuristic will sometimes be wrong. [...] Reimer Behrends