Cool!!!! I got this from approximately 71% perldoc perlre:
print "5: got $1\n" if $x =~ /^(\D*)(?=\d)(?!123)/; so I don't need "||" between multiple look ahead assertions... Sometimes, it's more rewarding to solve you're problem on your own. You just have to RTFM.. :-) More power to this helpful commmunity!! ----- Original Message ---- From: Michael Alipio <[EMAIL PROTECTED]> To: begginers perl.org <beginners@perl.org> Sent: Saturday, January 20, 2007 7:21:17 PM Subject: Alternative lookaheads in substitution, is it possible? Hi, Suppose I want to match all white spaces if it is followed by "\w+=" or not followed by "date or time" : $_ =~ s(/\s+(?=\w+=)/ || /\s+(?!(date|time)))/*/g; Doesn't seem to do what I want. Given a string: "Jan 19 11:37:21 firewall date=2007-01-19 time=11:42:15 msg="User admin login" I want it to produce something like: "Jan*19*11:37:21*firewall date=2007-01-19 time=11:42:15*msg="User admin login"*log=3 ____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ ____________________________________________________________________________________ The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php