in reply to Re: regular expressions help
in thread regular expressions help

Thanks! how do I solve the case where the numbers are preceeded by an '[' and the char/word ends with a ']'? Regards /Mathias

Replies are listed 'Best First'.
Re: Re: Re: regular expressions help
by castaway (Parson) on Nov 06, 2003 at 09:50 UTC
    Is that supposed to be one or two square brackets? In any case, you can look for square brackets in a regex by escaping them using a '\' like: \[.

    Now you should be able to build it, have a go..

    C.

      Yep it is supposed to be one :) I've got it now. Thanks for the help. Regards, Mathias
Re: regular expressions help
by Abigail-II (Bishop) on Nov 06, 2003 at 09:57 UTC
    /[[]/ matches a single [, and /[]]/ matches a single ].

    Abigail