On Tue, Nov 12, 2013 at 11:11:52PM +0200, Martin Storsjö wrote: > On Tue, 12 Nov 2013, Diego Biurrun wrote: > > >On Tue, Nov 12, 2013 at 06:03:06PM +0000, Derek Buitenhuis wrote: > >>On 11/12/2013 10:42 AM, Martin Storsjö wrote: > >>>This uses grep -o, which isn't a posix grep option, but is available > >>>on both OS X, gnu and msys (which uses gnu grep). Suggestions on > >>>a neater way to do the regexp matching are welcome. > >> > >>sed? > > > >Yes, something along the lines of > > > >diego@nibbler:~$ echo "Microsoft C++ Compiler 18.00.88" | sed 's/Microsoft > >C++ Compiler \(..\).*/\1/' > >18 > > > >could work, of course w/o the made-up pattern I just came up with. > > Yeah, although this requires hardcoding the preceding pattern (which > is different across the versions we support right now). The > differences aren't all that huge so it could be manageable, but if > there's a way to do it without it I'd prefer that.
's/Microsoft.*Optimizing Compiler Version \(..\)/\1/' That should work across all the compiler strings I see on FATE and be reasonably robust. Diego _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
