How to parse and group hierarchical list items from an unindented ...
Mar 27, 2024 ... ) Build and test regex with flavors like PCRE, Python, Golang, Java 8, .NET, etc. Find mode only, no replace mode. https://regex101.com ...
Mar 27, 2024 ... ) Build and test regex with flavors like PCRE, Python, Golang, Java 8, .NET, etc. Find mode only, no replace mode. https://regex101.com ...
regex. Alternative regular expression module, to replace re. Has the flag, but not sure how it functions.Because it’s an extra package I have to install and learn. everyone reading the package also has to learn it.
Feb 25, 2020 ... that time zone data is installed alongside Python whenever possible ... The PYTHONTZPATH option should be a string delimited by os.pathsep ,
Discussions on Python.org. Feature Proposal: Multi-String Replacement Using a Dictionary in the .replace() Method. Ideas. HicaroD (Hicro).
Perhaps one day we can have re.compile(t'...'), get full regular expression syntax checking in editors. For what it’s worth, Visual Studio used to have this (before its syntax highlighting was replaced with the same implementation as VS Code).
Simple (literal) string replacements are generally at least 5x as fast as regexes, so it might be worthwhile to make separate clauses for the regex and non-regex replacements, expecially if your texts are long and/or you have many search/replace pairs.
Regular expressions require such precision that I tend to feel that people should expect to have to read them really carefully anyway :frowning: So I tend to go for succinct if possible; at least there’s less stuff to parse.