in reply to Metatag processing (overlapping regions)
Nah, I'd go with your first approach:
If you insist on processing the string once, then I'd build a separate output string so that you don't modify the input string. - tye (but my friends call me "Tye")#!/usr/bin/perl -w use strict; my $str= "aa<bb>aa<U>aa</bb>aa</U>aa"; $str =~ s#<bb>(.*?)</bb># my $x= $1; $x =~ s/a/bb/g; $x #ge; $str =~ s#<U>(.*?)</U>#\U$1#g; print "($str)\n" __END__ prints (aabbbbBBBBAAaa)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: (tye)Re: Metatag processing (overlapping regions)
by kaatunut (Scribe) on Nov 12, 2000 at 02:44 UTC | |
by tilly (Archbishop) on Nov 12, 2000 at 02:53 UTC |