[SP-pm] [offtopic] Regex e subpatterns no SED
Alexei Znamensky
russoz at gmail.com
Mon Aug 18 15:09:13 PDT 2008
o gnu sed sim:
s/regexp/replacement/
Attempt to match regexp against the pattern space. If
success‐
ful, replace that portion matched with replacement.
The
replacement may contain the special character & to refer to
that
portion of the pattern space which matched, and the
special
escapes \1 through \9 to refer to the corresponding
matching
sub-expressions in the regexp.
as usual, RTFM
On Mon, Aug 18, 2008 at 5:20 PM, caio ariede <caio.ariede em gmail.com> wrote:
> Alguém pode me informar se o SED suporta subpatterns? Algo do tipo:
>
> ([0-9]+):(?1)
>
> Eu sei que essa lista não é sobre isso, mas já procurei em todo lugar e não
> achei sobre isso no SED.
>
> Se alguém puder ajudar, valeu. ;)
>
> --
> Caio Ariede
> http://caioariede.com/
>
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>
--
Alexei Znamensky [russoz_gmail_com] [russoz.wordpress.com] [
www.flickr.com/photos/alexeiz]
"Though we live in trying times, we're the ones who have to try"
-------------- Pr�xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20080818/414e93a0/attachment-0001.html>
More information about the SaoPaulo-pm
mailing list