On Tue, Mar 29, 2022 at 12:35:56AM -0700, Paul Bryan wrote: > I wonder if applying regular expressions would sufficiently address > your use case.
'Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.' -- Jamie Zawinski Apart from (probably) being slower and harder to understand, what benefit would a regular expression bring to this problem? Julio already has a working solution that does exactly what he wants: > > I have implemented this function locally to use it for my personal > > projects and It has proven to be really useful in practice, so I hope > > you find it useful as well and consider adding it as a class method > > for strings in Python. -- Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/MCIOI2RB24NOHVGF7IFQDXPJILLSKEAW/ Code of Conduct: http://python.org/psf/codeofconduct/