Re: Regex replace help

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

 



On Sun, Dec 4, 2011 at 12:07 AM, Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
> $ echo "const int TIXML_MAJOR_VERSION = 2;" | sed 's/const int
> TIXML_MAJOR_VERSION = \([0-9]+\).*/\1/'
> const int TIXML_MAJOR_VERSION = 2;

By replacing (sed 's/../../') with (sed -n 's/../../p') you can see
that the regex doesn't match.  The cause is that sed recognizes an
"\+" operator, not "+" operator.
   Mirek
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux