> hi all,
>
> can anyone please help me ???
>
> if got a string:
> "1<1<1,1<1,1,1[+1,1,1]>[+1,1]><1,2[+1,2]>[+1]>[+]"
>
> and want to remove all "[...]" things, using a wrong regex, because mine
> starts by the first [ and ends by the last "]" to remove.
> :
> <1<1,1<1,1,1
>
> I using:
>
> $p =~ s/\[\+(.*)\]//;
Either
$p =~ s/\[\+(.*?)\]//;
# The ? makes the * not greedy, that is it matches as few
# characters as possible, not as much
or
$p =~ s/\[\+([\]]*)\]//; # [^\]] matches anything but ]
HTH, Jenda
== [EMAIL PROTECTED] == http://Jenda.McCann.cz ==
28th of March I'll march out of the "army"
I'll be free so if you want me ...
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web