in reply to Retrieving text between 2 strings/chars...
my $TestString = "hello there <here I am> today is sunny"; my @Matches = ($TestString =~ m|<(.+?)>|ogs);
This initializes @Matches with a list of all text strings between an initial < and the first > following it, possibly including later < characters. (In particular, "<<WonderText>>" would have the single match "<WonderText".)
As for the modifiers (a quick review; cf. the perl documentation for a full explanation)
I generally reach for the documentation if I need anything more complicated than the above.
|
|---|