M
Moltar
Hi,
I want to go through a scalar in a loop and find strings that match a certain regex.
For example:
$string = 'Hi there *foo*, some stuff *bar* followed by more stuff and another *foo*.';
I need to loop through and get all the occurances of two asterics and "remember" the stuff in between
them. I can get the regex going, but I can't figure out how to do it in a loop.
Please help!
TIA!
I want to go through a scalar in a loop and find strings that match a certain regex.
For example:
$string = 'Hi there *foo*, some stuff *bar* followed by more stuff and another *foo*.';
I need to loop through and get all the occurances of two asterics and "remember" the stuff in between
them. I can get the regex going, but I can't figure out how to do it in a loop.
Please help!
TIA!