On 1/3/06, Wilson Bilkovich <wilsonb / gmail.com> wrote:
> On 1/3/06, Joe Van Dyk <joevandyk / gmail.com> wrote:
> > Another silly regex question.
> >
> > I have a regex that's getting to be more than 100 chars long.  How can
> > I split it up on multiple lines?
> >
> You can put the 'x' option on the end of the regular expression.
> From the Pickaxe:
> ExtendedMode: Complex regular expressions can be difficult to read. The x option
> allows you to insert spaces, newlines, and comments in the pattern to
> make it more
> readable.
>
> e.g.
> %r{some regex
> with
> multiple
> lines
> }x

ah, nice.  Too bad vim doesn't highlight the comments.  :(