[Mplayer-cvslog] CVS: main configure,1.653,1.654

Felix Buenemann atmosfear at users.sourceforge.net
Thu Feb 13 21:33:48 CET 2003


On Thursday 13 February 2003 19:54, D Richard Felker III wrote:
> On Thu, Feb 13, 2003 at 06:15:42PM +0100, Felix Buenemann wrote:
> > On Wednesday 12 February 2003 23:44, Arpi wrote:
> > > Hi,
> > >
> > > > > sed -e 's/^\([0-9]*\)\.\([0-9]*\).*/\1\2/'`
> > > > > _def_faad_version="#define FAADVERSION $_faad_tempversion"
> > > > >      echores "yes ($_faad_version)"
> > > > >    else
> > > >
> > > > ??? why you changed it, before it could match 1.0, 10.2, 10.23 etc,
> > > > now it will also match "." which is wrong (* means none or more, +
> > > > means one or more).
> > >
> > > that version with + didn't work. later someone at -users told me that
> > > + has to be escaped (so \+ ) in sed... feel free to fix.
> >
> > but it is \+ in the original code, ...
>
> Somebody didn't RTFM!! sed does not use extended or perl regex's, just
> basic ones, which do not have any form of +. If you want that
> functionality, put the pattern twice and follow the second instance of
> it by a *. I still think this is a nonsensical way to figure out a
> version number. See my post in the thread a while back for a correct
> way.
hmm, I did RTDM info sed, but not carefully enough:

`CHAR'
     A single character, if not special, is matched against text.

`*'
     Matches a sequence of zero or more repetitions of previous
     character, grouped regexp (see below), or class.

`\+'
     As *, but matches one or more.  It is a GNU extension.

`\?'
     As *, but only matches zero or one.  It is a GNU extension.

`\{I\}'
     As *, but matches exactly I sequences (I is a number; for
     portability, keep it between 0 and 255)

`\{I,J\}'
     Matches between I and J, inclusive, sequences.

`\{I,\}'
     Matches more than or equal to I sequences.

so \+ and \? are GNU extensions, but we should then use \{1,\} which should be 
portable.

> Rich

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________


More information about the MPlayer-cvslog mailing list