Re: complex regex



On Wed, 10 Oct 2007 01:56:00 -0000, carlbernardi@xxxxxxxxx wrote:
I am new to java.util.regex package which I am using to detect each
time the javascript tag occurs in an html file and delete it. I
tried using the following code to find examples such as the ones
below but instead it finds the first occurrence of "<" and the last
occurrence of ">" which is not what I am looking for.

Of course, because you are using greedy quantifiers, which will match
as much as possible. Use reluctant quantifiers instead, or at least a
more restrictive set of characters before and after "jscript".

/gordon

--
.