Re: sed regex oddness

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2016/5/4 15:50, dwoody5654 wrote:
> On 05/04/2016 12:44 AM, Philip Rhoades wrote:
>> People,
>> 
>> This behaves as expected:
>> 
>> echo 'This is a test 12335 and 669384 535xy4' | sed
>> 's/[0-9]*//g'
>> 
>> but I would expect this:
>> 
>> echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//'
>> 
>> to delete the first string of digits but it doesn't do anything .
>> . clarification from a sed guru?
> [0-9]* means zero or more digits. [0-9][0-9]* would be one or more
> digits
> 
> David
Then the command line would be
    echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]\+//'
to remove the first string of digits.
>> 
>> Thanks,
>> 
>> Phil.
> -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe
> or change subscription options: 
> http://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.o
rg
>
> 
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines 
> Have a question? Ask away: http://ask.fedoraproject.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXKbkNAAoJEC8FnrP95NDKT08QAIPwz1Mc8HeWGpKRoIEzI6Nz
BcOQ5PRmT+4cH7H2isIhUxbfIOqLCrY5sGtb3LHhWmFeLpNVpk1Hpi9kxN3DwAdX
vZ8WKbsbgRHCz0155Yu+YfgR2X+vJOTZ1JfAGHmAFupXrlOH5/AKwJKjIV/RFJ6t
S70zq8YO4+ccdM+iK9d36N4b1fZ/FujldoYoXBHKVHyuoLZPOv7o2daOOtJiMLGI
qURVqe/PCZVf75LUs9jsG5DAL0JfFvEXgXb0GKgenypZxQq2p3u33FxbZZhX0HBR
J0Rs0Pu28WxhWK9Am/vJgKQ+O9/TtLFqtqOW7m9eYne1CSw6itScViNPIBxLzkO9
NQ8pkusEp1/A8P87oSsr22AJEIuvX5tqfCWMJ5h5+hgM20XZt4zxrG9Kd99MVyWc
otbSPze+FydA+wLrX1bYOeo97ZmmKe3r6Gc67RY0LkmXLnuBQqtAYxeIRIFfGRwV
ISlwEA4PcuDrO4Re6GsJ699nMNj9GzbEPi2PvkG1q6mZPd8cDGgf27uEHZ4CcjPc
iPtCZ4TL3prW59cxcM647hnTUHWs1Ugypd2Ma4U+o0yMJRBXCBtoWW/w7srDeeQp
n/ZEv7pKDUJihhJZxSnCbPonFJBd+txXMcql8wj1n47KdlUjXXwpIlFQD8REfXEx
CzelHmD7ihAUC81RScZs
=zYk6
-----END PGP SIGNATURE-----
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
http://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux