On Sunday, June 9, 2002, at 05:57 , Tor Hildrum wrote:
[..]
> $target=~s/\(.+?\)//gi;
>
> print "$target\n";
>
> [localhost:~/Programming/Perl/Various code] tor% ./greedy
> micheal john
> [localhost:~/Programming/Perl/Various code] tor%
>
> This does however produce 2 spaces between the two name
> BlankHi everyone,
>
> I need some help for preventing greedy match..I want to get rid of the
> words in paranthesis in the below text. When i use the code below i loose '
> john ' because it matches the last ' )' after recovery.. Is there a easy
> way to avoid this?..
>
>
> $target='michea
BlankHi everyone,
I need some help for preventing greedy match..I want to get rid of the
words in paranthesis in the below text. When i use the code below i loose '
john ' because it matches the last ' )' after recovery.. Is there a easy
way to avoid this?..
$target='micheal (fields) john