H
hugo
I would like a regular expression that can match a sequence of
variable length patterns. Each pattern begins with a known TAG and is
followed by a variable number of characters. In the following, TAG is
literal, and the x's indicated arbitrary characters.
TAGxxx
TAGxxxxxx
TAGxxTAGxxxx
TAGxxxTAGxxxxTAGxxxxx
you get the idea. Don't read anything into the number of x's, their
count is variable. Of course, I'll need the results grouped so I can
extract each of the segments. The following doesn't work,
(TAG)(.*)
This expression finds just the first TAG and then gobbles the rest.
Want I want is (.*) with the restriction that it not contain the
sequence TAG.
Thanks
variable length patterns. Each pattern begins with a known TAG and is
followed by a variable number of characters. In the following, TAG is
literal, and the x's indicated arbitrary characters.
TAGxxx
TAGxxxxxx
TAGxxTAGxxxx
TAGxxxTAGxxxxTAGxxxxx
you get the idea. Don't read anything into the number of x's, their
count is variable. Of course, I'll need the results grouped so I can
extract each of the segments. The following doesn't work,
(TAG)(.*)
This expression finds just the first TAG and then gobbles the rest.
Want I want is (.*) with the restriction that it not contain the
sequence TAG.
Thanks