openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #16573
Re: [Merge] lp:~raoul-snyman/openlp/natural-sorting into lp:openlp
I've just been learning up on re, and the instructor said to use
parenthesis the opening parenthesis should be "(?:"
Just looked at the docs and they state:
"(?:...) A non-capturing version of regular parentheses. Matches whatever
regular expression is inside the parentheses, but the substring matched by
the group cannot be retrieved after performing a match or referenced later
in the pattern."
So it looks like there's not much in using either way. Maybe the instructor
was saying this as "best practice" for when he introduces groups, maybe its
slightly more efficiant, or maybe it doesn't make the slightest difference
in this case, I don't know.
I dont doubt your wisdom, but wasn't sure if you missed something or not.
Either way I learn something. :-)
--
https://code.launchpad.net/~raoul-snyman/openlp/natural-sorting/+merge/113873
Your team OpenLP Core is subscribed to branch lp:openlp.
References