Re: OT: simple regex question

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

 



Il giorno lun, 23/04/2007 alle 11.05 +0100, Matt Davey ha scritto:
> echo "aa bb cc dd" | perl -pe 'exit(!(/(?=.*bb)(?=.*aa)/));'

Ok for perl, but I must match the word 'aa' and (for example) 'bb',
someone like this: /(\saa\s)&(\sbb\s)/ .....

Your example found also "aa xxbb cc dd" and is not what I want...

however ... Many thanks

-- 
Dario Lesca <d.lesca@xxxxxxxxxx>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux