Re: complex regex
- From: Gordon Beaton <n.o.t@xxxxxxxxx>
- Date: 10 Oct 2007 06:22:16 GMT
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
--
.
- References:
- complex regex
- From: carlbernardi@xxxxxxxxx
- complex regex
- Prev by Date: Re: the cost of intermediate objects
- Next by Date: Re: Same problem...
- Previous by thread: complex regex
- Next by thread: complex regex
- Index(es):