[vox-tech] regex help - matching literal []

Micah J. Cowan micah at cowan.name
Fri Apr 28 14:05:18 PDT 2006


On Fri, Apr 28, 2006 at 01:25:41PM -0700, Rod Roark wrote:
> On Friday 28 April 2006 01:07 pm, Peter Jay Salzman wrote:
> ...
> > However, the compiler complains when I escape the square brackets with a
> > backslash.  For some reason \[ doesn't match a literal [.
> 
> Sounds like you need to double up on the backslashes -- once for the
> compiler's parsing of string literals, and once for the regex parser.

You could also use "[[].*]".

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/


More information about the vox-tech mailing list