Hello, This (perl -n -we 'print if /[\[\].]{2}/;' file) almost did the trick, but it was also picking up lines with many .......... or many ........ flanked in between something. So I ammended it to (as there is always a space between the characters I am trying to pull out):
perl -n -we 'print if /\s[\[\].]{2}\s/;' file | more cheers a lot, aim ===================================================== Stefan Lidman wrote: > Hi > > Try > > % perl -n -we 'print if /[\[\].]{2}/;' file > > or > > % grep -P "[\[\].]{2}" file > > /Stefan > > Aimal Pashtoonmal wrote: > > > > thanks for the reply, > > > > I managed to sus it as part of a perl script but on the command line it > > does nothing. > > > > Also your suggestion also does nothing on the command line. > > > > this is what I did: grep "[\[\].]{2}" file > > am I missing some thing? > > > > cheers aim. > > > > ============================================= > > Stefan Lidman wrote: > > > > > Hello > > > > > > I am not sure what you want but: > > > > > > /[\[\].]{2}/ > > > > > > will match any combination of two .[] > > > > > > /Stefan > > > > > > Aimal Pashtoonmal wrote: > > > > > > > > Hello, > > > > > > > > I am trying to use command line grep and perl regex to capture all > > > > combinations of the following, but I am not getting everything: > > > > > > > > something digits/digits digits digits .. digits > > > > digits .. digits digits.digits > > > > something digits/digits digits digits .. digits > > > > digits .] digits digits.digits > > > > something digits/digits digits digits .. digits > > > > digits [. digits digits.digits > > > > something digits/digits digits digits .. digits > > > > digits [] digits digits.digits > > > > something digits/digits digits digits [. digits > > > > digits .] digits digits.digits > > > > something digits/digits digits digits [] digits > > > > digits [] digits digits.digits > > > > something digits/digits digits digits [. digits > > > > digits .. digits digits.digits > > > > something digits/digits digits digits [. digits > > > > digits [] digits digits.digits > > > > something digits/digits digits digits [] digits > > > > digits .. digits digits.digits > > > > something digits/digits digits digits .] digits > > > > digits .. digits digits.digits > > > > something digits/digits digits digits [. digits > > > > digits [. digits digits.digits > > > > something digits/digits digits digits .] digits > > > > digits .] digits digits.digits > > > > something digits/digits digits digits .] digits > > > > digits [. digits digits.digits > > > > > > > > I think above are all the possibles. > > > > > > > > Thanks in advance for your input > > > > > > > > aim. > > > > > > > > -- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]