Re: "negative" regexp
- From: Tad J McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 12:01:06 GMT
Petr Vileta <stoupa@xxxxxxxxxxxxx> wrote:
$html=~s/<\!\-\-.+?\-\->//sig;
Unnecessary backslashes make your code much harder to read
and understand. You should backslash only when you actually
need to.
There is not much point in ignoring case when your pattern
does not contain any letters...
$html =~ s/<!--.+?-->//sg;
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
.
- Follow-Ups:
- Re: "negative" regexp
- From: Petr Vileta
- Re: "negative" regexp
- References:
- "negative" regexp
- From: Petr Vileta
- Re: "negative" regexp
- From: Abigail
- Re: "negative" regexp
- From: Petr Vileta
- Re: "negative" regexp
- From: Petr Vileta
- "negative" regexp
- Prev by Date: Easiest Way For Making Money
- Next by Date: Re: Magic for object constructor wanted
- Previous by thread: Re: "negative" regexp
- Next by thread: Re: "negative" regexp
- Index(es):