in reply to regex question
print "$1 $2\n" if($str=~/(.*?)\*(.*)/);
Note that both of them produce:print "$1 $2\n" if($str=~/(.*?)\*(.*?)$/);
Elimination of that . left as an exercise. ;-)Test .Value
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex question
by Alien (Monk) on Sep 01, 2008 at 07:45 UTC |