Re: [MacPerl-AnyPerl] Pattern matching: HELP!

[email protected] (John Delacour) Tue, 23 Apr 2002 13:46:48 +0100
Newsgroups perl.macperl.anyperl
Message-ID <v03130300b8eb072a268f@DialupEudora>
At 12:59 pm +0000 23/4/02, <[email protected]> wrote:
| I'm tring to do a pattern matching on this string but after many days no
|results.
|Is there someone who can help me.Many thanks
|
| Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy00

You don't say what you want to extract or change or whatever.  If you just
want to get the user, then do something like this:

	$s = q(Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy00);
	$user = substr ($s, 11 + index($s, "Login u"), -1);
	print "$user$/";

If not, you need to ask a longer question.

JD