On Mon, 7 May 2001, Craig Moynes/Markham/IBM wrote:

> I have a string like this:
> $string1 = "[%a %H:%M:%S %c] - - etc.etc.etc";
>
> I need to parse out all the substrings that are similar to "%x" (where x is
> any letter)
>
> I have thought about tackling this using the regexp (%\w) using the
> grouping and getting each match with $n (where n is a number) but I can't
> seem to get the regexp to match more than the first match.
>
> All I actually need is the single character following each '%' sign, but I
> can do that stage on my own :)

@formats = $string1 =~ /%(\w)/g;

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Great minds run in great circles.

Reply via email to