On Sat, Jun 14, 2008 at 11:57 AM, xaviermasr <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm starting to use bash programming and I'd like to know if it can use > minimal expressions (.*?) as in Perl. 'sed' command can use them, but I > think isn't possible within bash commands (as ingrep manipulating string > commands). My main concern is to use bash for file processing.
The answer is no, and as far as I know sed doesn' t have non greedy regular expressions. Awk (or perl for what it's worth) is a better choice for processing files than bash but also doesn't have non greedy regexp. You can perhaps use something like "([^>]*)>" to match up to the first >