problems with regular expressions
From: Dan Anderson (dan_at_mathjunkies.com)
Date: 11/29/03
- Previous message: Dan Anderson: "Re: Viewing logs on other computers."
- Next in thread: James Edward Gray II: "Re: problems with regular expressions"
- Reply: James Edward Gray II: "Re: problems with regular expressions"
- Reply: R. Joseph Newton: "Re: problems with regular expressions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: 29 Nov 2003 14:15:00 -0500
I have a regular expression that looks like:
$foo =~ s[class.*?=.*?'.*?'][]sgi;
The problem I run into is that if the following is presented to match:
<table class='foo'><tr class='baz'><td class='bar'>
The regular expression will match:
class='foo'><tr class='baz'><td class='bar'
And I'll get:
<table >
Is there any way I can tell the .*? to match "" as well as "."?
Thanks in advance,
Dan
- Previous message: Dan Anderson: "Re: Viewing logs on other computers."
- Next in thread: James Edward Gray II: "Re: problems with regular expressions"
- Reply: James Edward Gray II: "Re: problems with regular expressions"
- Reply: R. Joseph Newton: "Re: problems with regular expressions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]