iang has asked for the wisdom of the Perl Monks concerning the following question:
I want to use a regex to assign a portion of the string ( including whitespace) into different slots in an array there can be any number of TAG=xxxx values. I tried the regex :$a ="aaa bbb ccc dd ee ff dd TAG=lls foo TAG=some randome tag TAG=last +_tag";
I used several other permutations of a regex all to no avail. I was hoping that somebody can point me in the right direction. Thank You@b = ($a =~ m/aaa bbb .*? (TAG=.*) */g); @b = ($a =~ m/aaa bbb .*? {1,}(TAG=.*) */g)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Repeating regex assign to a list
by Tanktalus (Canon) on Mar 04, 2016 at 18:10 UTC | |
by iang (Sexton) on Mar 04, 2016 at 18:49 UTC | |
by AnomalousMonk (Archbishop) on Mar 04, 2016 at 20:11 UTC | |
Re: Repeating regex assign to a list
by neilwatson (Priest) on Mar 04, 2016 at 18:08 UTC | |
Re: Repeating regex assign to a list
by Laurent_R (Canon) on Mar 04, 2016 at 18:08 UTC |