Appendix E. Regular Expressions

Jaysen Lorenzen

Regular expressions are patterns that match groups of characters. We can use them to find and return (or replace) characters, words, and lines. Python's standard-distribution re module derives from Perl's regular expressions, which, like Perl itself, combine features from UNIX utilities such as Awk, Sed, and Grep, and programs like vi and Gnu Emacs. Though the syntax and metacharacters may be slightly different, expressions in any of these tools can be written in Jython.

Get Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.