Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Re: Re: RegEx to filter \s not between labels

by I0 (Priest)
on May 23, 2002 at 21:40 UTC ( #168904=note: print w/replies, xml ) Need Help??

in reply to Re: Re: RegEx to filter \s not between labels
in thread RegEx to filter \s not between labels

#Okay, you asked for it:
$_ = '0 1 STARTPRESERVE STARTPRESERVE 2 STOPPRESERVE STOPPRESERVE 3 4 STARTPRESERVE STARTPRESERVE 5 STOPPRESERVE STOPPRESERVE 6 7'; (my $re=$_)=~s/((STARTPRESERVE)|(STOPPRESERVE)|.)/${['(','']}[!$2]\Q$1 +\E${[')','']}[!$3]/gs; $re= join'|',map{quotemeta}eval{/$re/}; die $@ if $@ =~ /unmatched/; s/\s+|($re)/${[$1,' ']}[!$1]/g;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://168904]
LanX can't hint anymore to zentaras video because he disappeared
[LanX]: auto-subtitles in YT are entertaining: "fuehrer" instead of fewer, "jews" instead of juice ...
Discipulus never noticed there was subtitles... can I call them with &subtitle or is too much perl 4?

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2017-06-23 16:30 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (552 votes). Check out past polls.