View Single Post
Old 08-12-2008, 02:01 AM   #21
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Regular expressions do work. I am aware that there are some implementation differences for regexprs and something like
Code:
(foo)+|(bar)+
does not work for me with grep on my iliad or my PC. You need to escape the brackets (see note below) and pipe, like this:
Code:
\(foo\)\|\(bar\)
For those who don't know regular expressions, this code above searches for either "foo" or "bar" in the manifest. For two words that both have to exist, but not necessarily right next to each other, e.g. "foo wibble wibble bar", it would be:
Code:
foo.*bar

NOTE: I should probably say "\(brackets\)\|\(parentheses\)" depending on whether you are using british or american english

Last edited by daudi; 08-12-2008 at 02:09 AM.
daudi is offline   Reply With Quote