bug-bash
[Top][All Lists]
Advanced

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

Re: minimal expression


From: Pierre Gaston
Subject: Re: minimal expression
Date: Mon, 16 Jun 2008 09:52:02 +0300

On Sat, Jun 14, 2008 at 11:57 AM, xaviermasr <address@hidden> 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 >




reply via email to

[Prev in Thread] Current Thread [Next in Thread]