[CentralOH] Regex Testers

Travis Risner deeppunster at fastmail.com
Tue Jan 28 18:03:34 EST 2020


Hi,

At last night’s monthly COhPy meeting I showed a number of regex 
testing web sites that I have stumbled across.  Here is a list of them 
followed by IDE based testers, standalone testers, a list of “cheat 
sheet” sites and the formal Python documentation.

#### Web Based Regular Expression Testers

*	https://pythex.org/
	*	This is the one that Eric Floehr showed us.
	*	Appears to be match only.
	*	Includes cheat sheet style hints below the testing area.

*	http://www.pyregex.com/
	*	Can test match, findall, and search Python regexes.
	*	This one has a handy cheat sheet below.

*	https://www.debuggex.com/
	*	Appears to be match only.
	*	Change the dropdown on the left (part way down) to make it Python 
oriented.
	*	Includes a link to a cheat sheet.
	*	If you sign in, it has a library of example matches for SSN’s, 
ISBN’s, Credit Cards, etc.

*	https://regex101.com/
	*	Need to select Python on the left or set in settings.
	*	Appears to be match only.
	*	Has sample expressions submitted by others.
	*	Has a quiz option.

*	http://www.regexplanet.com/advanced/python/index.html
	*	Appears to provide match and replace options.
	*	Has a cookbook of hundreds of examples, but you have to sign in first 
to see them.

*	https://regexr.com/
	*	Has options for Javascript and PCRE only - no Python.
	*	Has both match and replace options.
	*	Provides an explanation for each element of the regex syntax when you 
hover over the element.
	*	Has option to explain all elements of the regex pattern.

*	https://rubular.com/
	This is ruby oriented and is not Python-specific.
	This site inspired several of the sites above.

#### IDE Based Regular Expression Testers

*	PyCharm
	*	Has a plugin available called Regex Tester.  Unfortunately it is Java 
oriented.

*	PyScripter
	*	Has Python oriented regex feature.  However, this IDE can only be 
installed on Windows.

*	Other IDE’s may have support for testing regexes, but I do not have 
any experience with them.

#### Standalone Regular Expression Testers

*	Expresso (http://www.ultrapico.com/Expresso.htm)
	*	I showed a link to this downloadable program for testing regular 
expressions.  However, it will it only install and run on Windows, and 
it only uses the .net regular expression engine.

*	Regex Buddy (https://www.regexbuddy.com/index.html)
	*	This is another program that can test regular expressions without 
needing the internet.  Although it can convert Regexes from one flavor 
to another (e.g. Javascript to Python), it only runs on Windows — and 
costs $40 to boot.

#### Cheat Sheets

*	https://www.dataquest.io/blog/regex-cheatsheet/
	*	Has downloadable PDF cheat sheet as well as regex hints lower down on 
the page.

*	https://github.com/tartley/python-regex-cheatsheet/
	*	This is a GitHub repository that will build a PDF cheat sheet.

*	https://www.tutorialspoint.com/python/python_reg_expressions.htm
	*	More of a list of all regex elements and a description of what each 
does.

#### Formal Python re library documentation:

	https://docs.python.org/3/library/re.html

Notes:

*	Al Sweigart’s book _Automate the Boring Stuff_, chapter 7, is an 
excellent tutorial on much of the regex syntax.

*	The book _The Python 3 Standard Library by Example_ by Doug Hellmann 
has examples of each regex element and how it can be used.  Perhaps you 
can find it in the library as it is rather expensive.

HTH,
Travis

--
Travis Risner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20200128/1c9c272e/attachment-0001.html>


More information about the CentralOH mailing list