[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Expresão regular para filtar URL



> > URL
> > http://www.itau.com.br/campanhas/bankline/lancamento/detecta_482x192.htm
> > https://itaubankline.itau.com.br:443
> >
> > Resultado: SITE
> > http://www.itau.com.br
> > https://itaubankline.itau.com.br
> >
> > Fiz a seguinte expressão regular para usar com o sed:
> > sed 's/\w\+:\/\/\(\w\+-\?\w*\.\)\+\w*//' arquivo_com_urls

 Olá

 O sed pode ficar mais simples.

$ sed s'/br\(.*\)/br/'


 []

--
Herbert Parentes Fortes Neto (hpfn)
Linux user number 416100
0x9834F79E -- http://pgp.mit.edu/

Attachment: pgpZncaiUr026.pgp
Description: PGP signature


Reply to: