|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Nic,
>> my @tokens = split /([<>])/, $badhtml;
>
> Can you explain the magic?
Funny, it doesn't look magical to me. Maybe I've been hanging
around you guys too long. "You can't fool me. There ain't no
sanity clause."
Which part do you need explaining?
Character class containing two characters < and >:
[<>]
IOW, match < or >. Use it as the delimiter to split the string
$badhtml with:
my @tokens = split /[<>]/, $badhtml;
Oh, btw, include the matching delimiters too:
my @tokens = split /([<>])/, $badhtml;
See you tonight.
-Hao
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|