It looks there is a space there..

# perl -e '$text = "(7)   32"; printf "[%s][%s]\n", ( $text =~  /\((\d+)
\)\s+(\d+)/ )'
[][]
# perl -e '$text = "(7)   32"; printf "[%s][%s]\n", ( $text =~
/\((\d+)\)\s+(\d+)/ )'
[7][32]


On Mon, Oct 6, 2008 at 2:51 PM, irata <[EMAIL PROTECTED]> wrote:

> Hello,
>
> can someone explain me, why this short regex don't give the result I
> expect:
>
> perl -e '$text = "(7)   32"; printf "[%s][%s]\n", ( $text =~  /\((\d+)
> \)\s+(\d+)/ )'
>
> I supposed that the output is "[7][32]", but the output is "[][]". I
> don't know why...
>
> Regards...
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>

Reply via email to