Re: sed regex oddness

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

 



On 05/05/2016 01:47 PM, Patrick O'Callaghan wrote:
On Thu, 2016-05-05 at 10:31 -0700, Samuel Sieb wrote:
On 05/05/2016 10:11 AM, Rick Stevens wrote:

On 05/05/2016 08:56 AM, Samuel Sieb wrote:

On 05/05/2016 03:35 AM, Ian Malone wrote:

On 5 May 2016 at 10:27, Patrick O'Callaghan <pocallaghan@gmail.
com>
wrote:

On Wed, 2016-05-04 at 16:24 -0700, Samuel Sieb wrote:

Oh, right.  I never use a regexp that can match nothing, so
I missed
that. :-)
You never use '*'?

I guess he meant "match *only* nothing", most of the time using
*
you'll still use it in combination with a non-empty pattern.
Easy to
miss that only [something]* can match nothing and therefore
first
matches at the start of the line.

Yes, that's what I meant.  I can't imagine where that would even
be
useful.
How about looking for "something[0-9]*" so it would match
"something" or
"something0" or "something99". "*" can be useful, you just have to
be
careful.
See, it's such an odd thing to do that people don't understand it. :-
)
It's not about using *, I certainly do use that.  It's about making
a
regexp that can match the empty string.

I fail to see what's odd about it. When you match something with an
optional part it's completely normal.

Thank you for making my point once again...
This is about the case where the entire regexp will match the empty string!
--
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