Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Regexp. Combination of words block. Need help.

by nickwest (Initiate)
on Feb 09, 2020 at 11:23 UTC ( [id://11112676]=note: print w/replies, xml ) Need Help??


in reply to Re: Regexp. Combination of words block. Need help.
in thread Regex. Combination of words block. Need help.

$b = 'aaa,bbb,ccc ddd; eee fff, kv.6 end'; @a = split(/[\s\,\.\;]+/, $b); for ($i=0;$i<$#a-1;$i++) { $_ = $b; $k = $a[$i]; s/^.*$k[\s\,\.\;]+//; push @c, $_; } push @a, @c, $b; foreach (@a) { print "$_\n"; }

and get:
aaa bbb ccc ddd eee fff kv 6 end bbb,ccc ddd; eee fff, kv.6 end ccc ddd; eee fff, kv.6 end ddd; eee fff, kv.6 end eee fff, kv.6 end fff, kv.6 end kv.6 end 6 end aaa,bbb,ccc ddd; eee fff, kv.6 end

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11112676]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-19 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found