But what if I have a string containing "abc*def*ghi" (or any number of "words")? Is there a way to obtain abc,def,ghi without resorting to split ?Is it possible that you're not describing what you want to do? Normally, it's good if you can use split—it's much faster for this kind of job than pulling the string apart with regexes. According to Benchmark (with all the usual caveats: on my machine, at this time of day, &c.), split /\*/, $string is about 3 times faster than the clever my @matches = $string =~ /([^*]+)/g suggested in Re^3: regex question.
In reply to Re^3: regex question
by JadeNB
in thread regex question
by Alien
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |