[Comandob] Fwd: Re: mirar si N processos estan corrent, en Perl
Ferran Fontcuberta
ferran at fompi.net
Mon Nov 2 16:20:21 CET 2009
El sáb, 31-10-2009 a las 08:16 +0100, Daniel López escribió:
> > > així sí:
> > >
> > > perl -e 'print $1 if "foo bar" =~ /(?: (bar)?)/'
> >
> > Merci! :)
> >
> > Era l'espai, que tocava els collonets... ¿docu o proves? Si es docu,
> > m'hi pots referir, si vos plau?
>
> mira:
>
> no és l'espai, és el non-capturing groups:
>
> "?:"
Ho conec, però així funciona:
perl -e 'print $1 if "foo bar" =~ /(?: (bar)?)/'
i així no:
perl -e 'print $1 if "foo bar" =~ /(?:(bar)?)/'
More information about the Comandob
mailing list