CINXE.COM
Python re Module - Use Regular Expressions with Python - Regex Support
<!DOCTYPE html> <html lang="en"><head><meta charset="utf-8"><link rel=canonical href='https://https://www.regular-expressions.info//python.html'><title>Python re Module - Use Regular Expressions with Python - Regex Support</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="author" content="Jan Goyvaerts"> <meta name="description" content="Learn how to use regular expressions with Python’s re module"> <meta name="keywords" content=""> <link rel=stylesheet href="regex.css" type="text/css"><script src="theme.js" type="text/javascript"></script><link rel="alternate" type="application/rss+xml" title="New at Regular-Expressions.info" href="updates.xml"> </head> <body bgcolor=white text=black> <div id=top></div> <div id=btntop><div id=btngrid><a href="quickstart.html" target="_top"><div>Quick Start</div></a><a href="tutorial.html" target="_top"><div>Tutorial</div></a><a href="tools.html" target="_top"><div>Tools & Languages</div></a><a href="examples.html" target="_top"><div>Examples</div></a><a href="refflavors.html" target="_top"><div>Reference</div></a><a href="books.html" target="_top"><div>Book Reviews</div></a></div></div> <div id=contents><div id=side> <TABLE CLASS=side CELLSPACING=0 CELLPADDING=4><TR><TD CLASS=sideheader>Regex Tools</TD></TR><TR><TD><A HREF="grep.html" TARGET=_top>grep</A></TD></TR><TR><TD><A HREF="powergrep.html" TARGET=_top>PowerGREP</A></TD></TR><TR><TD><A HREF="regexbuddy.html" TARGET=_top>RegexBuddy</A></TD></TR><TR><TD><A HREF="regexmagic.html" TARGET=_top>RegexMagic</A></TD></TR> </TABLE><TABLE CLASS=side CELLSPACING=0 CELLPADDING=4><TR><TD CLASS=sideheader>General Applications</TD></TR><TR><TD><A HREF="editpadlite.html" TARGET=_top>EditPad Lite</A></TD></TR><TR><TD><A HREF="editpadpro.html" TARGET=_top>EditPad Pro</A></TD></TR> </TABLE><TABLE CLASS=side CELLSPACING=0 CELLPADDING=4><TR><TD CLASS=sideheader>Languages & Libraries</TD></TR><TR><TD><A HREF="boost.html" TARGET=_top>Boost</A></TD></TR><TR><TD><A HREF="delphi.html" TARGET=_top>Delphi</A></TD></TR><TR><TD><A HREF="gnu.html" TARGET=_top>GNU (Linux)</A></TD></TR><TR><TD><A HREF="groovy.html" TARGET=_top>Groovy</A></TD></TR><TR><TD><A HREF="java.html" TARGET=_top>Java</A></TD></TR><TR><TD><A HREF="javascript.html" TARGET=_top>JavaScript</A></TD></TR><TR><TD><A HREF="dotnet.html" TARGET=_top>.NET</A></TD></TR><TR><TD><A HREF="pcre.html" TARGET=_top>PCRE (C/C++)</A></TD></TR><TR><TD><A HREF="pcre2.html" TARGET=_top>PCRE2 (C/C++)</A></TD></TR><TR><TD><A HREF="perl.html" TARGET=_top>Perl</A></TD></TR><TR><TD><A HREF="php.html" TARGET=_top>PHP</A></TD></TR><TR><TD><A HREF="posix.html" TARGET=_top>POSIX</A></TD></TR><TR><TD><A HREF="powershell.html" TARGET=_top>PowerShell</A></TD></TR><TR><TD><A HREF="python.html" TARGET=_top>Python</A></TD></TR><TR><TD><A HREF="rlanguage.html" TARGET=_top>R</A></TD></TR><TR><TD><A HREF="ruby.html" TARGET=_top>Ruby</A></TD></TR><TR><TD><A HREF="stdregex.html" TARGET=_top>std::regex</A></TD></TR><TR><TD><A HREF="tcl.html" TARGET=_top>Tcl</A></TD></TR><TR><TD><A HREF="vbscript.html" TARGET=_top>VBScript</A></TD></TR><TR><TD><A HREF="vb.html" TARGET=_top>Visual Basic 6</A></TD></TR><TR><TD><A HREF="wxwidgets.html" TARGET=_top>wxWidgets</A></TD></TR><TR><TD><A HREF="xml.html" TARGET=_top>XML Schema</A></TD></TR><TR><TD><A HREF="realbasic.html" TARGET=_top>Xojo</A></TD></TR><TR><TD><A HREF="xpath.html" TARGET=_top>XQuery & XPath</A></TD></TR><TR><TD><A HREF="xregexp.html" TARGET=_top>XRegExp</A></TD></TR> </TABLE><TABLE CLASS=side CELLSPACING=0 CELLPADDING=4><TR><TD CLASS=sideheader>Databases</TD></TR><TR><TD><A HREF="mysql.html" TARGET=_top>MySQL</A></TD></TR><TR><TD><A HREF="oracle.html" TARGET=_top>Oracle</A></TD></TR><TR><TD><A HREF="postgresql.html" TARGET=_top>PostgreSQL</A></TD></TR> </TABLE><TABLE CLASS=side CELLSPACING=0 CELLPADDING=4><TR><TD CLASS=sideheader>More on This Site</TD></TR><TR><TD><A HREF="index.html" TARGET=_top>Introduction</A></TD></TR><TR><TD><A HREF="quickstart.html" TARGET=_top>Regular Expressions Quick Start</A></TD></TR><TR><TD><A HREF="tutorial.html" TARGET=_top>Regular Expressions Tutorial</A></TD></TR><TR><TD><A HREF="replacetutorial.html" TARGET=_top>Replacement Strings Tutorial</A></TD></TR><TR><TD><A HREF="tools.html" TARGET=_top>Applications and Languages</A></TD></TR><TR><TD><A HREF="examples.html" TARGET=_top>Regular Expressions Examples</A></TD></TR><TR><TD><A HREF="refflavors.html" TARGET=_top>Regular Expressions Reference</A></TD></TR><TR><TD><A HREF="refreplace.html" TARGET=_top>Replacement Strings Reference</A></TD></TR><TR><TD><A HREF="books.html" TARGET=_top>Book Reviews</A></TD></TR><TR><TD><A HREF="print.html" TARGET=_top>Printable PDF</A></TD></TR><TR><TD><A HREF="about.html" TARGET=_top>About This Site</A></TD></TR><TR><TD><A HREF="updates.html" TARGET=_top>RSS Feed & Blog</A></TD></TR></TABLE></DIV><div class=bodytext><div class=topad><A HREF="https://www.regexbuddy.com/python.html" TARGET="_top"><picture><source media="(max-width: 370px)" srcset="ads/320/rxbpython100.png 1x, ads/320/rxbpython150.png 1.5x, ads/320/rxbpython200.png 2x, ads/320/rxbpython250.png 2.5x, ads/320/rxbpython300.png 3x, ads/320/rxbpython350.png 3.5x, ads/320/rxbpython400.png 4x"><source media="(max-width: 500px)" srcset="ads/360/rxbpython100.png 1x, ads/360/rxbpython150.png 1.5x, ads/360/rxbpython200.png 2x, ads/360/rxbpython250.png 2.5x, ads/360/rxbpython300.png 3x, ads/360/rxbpython350.png 3.5x, ads/360/rxbpython400.png 4x"><source media="(max-width: 660px)" srcset="ads/480/rxbpython100.png 1x, ads/480/rxbpython150.png 1.5x, ads/480/rxbpython200.png 2x, ads/480/rxbpython250.png 2.5x, ads/480/rxbpython300.png 3x, ads/480/rxbpython350.png 3.5x, ads/480/rxbpython400.png 4x"><source media="(max-width: 747px)" srcset="ads/640/rxbpython100.png 1x, ads/640/rxbpython150.png 1.5x, ads/640/rxbpython200.png 2x, ads/640/rxbpython250.png 2.5x, ads/640/rxbpython300.png 3x, ads/640/rxbpython350.png 3.5x, ads/640/rxbpython400.png 4x"><img src="ads/728/rxbpython100.png" srcset="ads/728/rxbpython100.png 1x, ads/728/rxbpython125.png 1.25x, ads/728/rxbpython150.png 1.5x, ads/728/rxbpython175.png 1.75x, ads/728/rxbpython200.png 2x, ads/728/rxbpython250.png 2.5x, ads/728/rxbpython300.png 3x, ads/728/rxbpython350.png 3.5x, ads/728/rxbpython400.png 4x" alt="RegexBuddy—The best regex editor and tester for Python developers!"></picture></A></div> <div class=bulb><h1>Python’s re Module</h1><script type="text/javascript">showbulb();</script></div> <p>Python is a high level open source scripting language. Python’s built-in “re” module provides excellent support for <A HREF="tutorial.html" TARGET="_top">regular expressions</A>, with a modern and complete regex flavor. Two significant missing features, <A HREF="atomic.html" TARGET="_top">atomic grouping</A> and <A HREF="possessive.html" TARGET="_top">possessive quantifiers</A>, were added in Python 3.11. Though Python’s regex engine correctly handles Unicode strings, its syntax is still missing <A HREF="unicode.html" TARGET="_top">Unicode properties</A> and <A HREF="shorthand.html" TARGET="_top">shorthand character classes</A> only match ASCII characters.</p> <p>The first thing to do is to import the regexp module into your script with <tt class=code>import re</tt>.</p> <h2>Regex Search and Match</h2> <p>Call <tt class=code>re.<b>search</b>(regex, subject)</tt> to apply a regex pattern to a subject string. The function returns <tt class=code>None</tt> if the matching attempt fails, and a <tt class=code>Match</tt> object otherwise. Since <tt class=code>None</tt> evaluates to <tt class=code>False</tt>, you can easily use <tt class=code>re.search()</tt> in an <tt class=code>if</tt> statement. The <tt class=code>Match</tt> object stores details about the part of the string matched by the regular expression pattern.</p> <p>You can set <A HREF="modifiers.html" TARGET="_top">regex matching modes</A> by specifying a special constant as a third parameter to <tt class=code>re.search()</tt>. <tt class=code>re.I</tt> or <tt class=code>re.IGNORECASE</tt> applies the pattern case insensitively. <tt class=code>re.S</tt> or <tt class=code>re.DOTALL</tt> makes the <A HREF="dot.html" TARGET="_top">dot match newlines</A>. <tt class=code>re.M</tt> or <tt class=code>re.MULTILINE</tt> makes the <A HREF="anchors.html" TARGET="_top">caret and dollar</A> match after and before line breaks in the subject string. There is no difference between the single-letter and descriptive options, except for the number of characters you have to type in. To specify more than one option, “or” them together with the | operator: <tt class=code>re.search("^a", "abc", re.I | re.M)</tt>.</p> <p>By default, Python’s regex engine only considers the letters A through Z, the digits 0 through 9, and the underscore as “<A HREF="shorthand.html" TARGET="_top">word characters</A>”. Specify the flag <tt class=code>re.L</tt> or <tt class=code>re.LOCALE</tt> to make <TT CLASS=syntax><SPAN CLASS="regexspecial">\w</SPAN></TT> match all characters that are considered letters given the current locale settings. Alternatively, you can specify <tt class=code>re.U</tt> or <tt class=code>re.UNICODE</tt> to treat all letters from all scripts as word characters. The setting also affects <A HREF="wordboundaries.html" TARGET="_top">word boundaries</A>.</p> <p>Do not confuse <tt class=code>re.search()</tt> with <tt class=code>re.<b>match</b>()</tt>. Both functions do exactly the same, with the important distinction that <tt class=code>re.search()</tt> will attempt the pattern throughout the string, until it finds a match. <tt class=code>re.match()</tt> on the other hand, only attempts the pattern at the very start of the string. Basically, <tt class=code>re.match("regex", subject)</tt> is the same as <tt class=code>re.search("<a href="anchors.html">\A</a>regex", subject)</tt>. Note that <tt class=code>re.match()</tt> does <i>not</i> require the regex to match the entire string. <tt class=code>re.match("a", "ab")</tt> will succeed.</p> <p>Python 3.4 adds a new <tt class=code>re.<b>fullmatch</b>()</tt> function. This function only returns a <tt class=code>Match</tt> object if the regex matches the string entirely. Otherwise it returns <tt class=code>None</tt>. <tt class=code>re.fullmatch("regex", subject)</tt> is the same as <tt class=code>re.search("<a href="anchors.html">\A</a>regex<a href="anchors.html">\Z</a>", subject)</tt>. This is useful for validating user input. If <tt>subject</tt> is an empty string then <tt>fullmatch()</tt> evaluates to <tt>True</tt> for any regex that can find a <A HREF="zerolength.html" TARGET="_top">zero-length match</A>.</p> <p>To get all matches from a string, call <tt class=code>re.<b>findall</b>(regex, subject)</tt>. This will return an array of all non-overlapping regex matches in the string. “Non-overlapping” means that the string is searched through from left to right, and the next match attempt starts beyond the previous match. If the regex contains one or more <A HREF="brackets.html" TARGET="_top">capturing groups</A>, <tt class=code>re.findall()</tt> returns an array of tuples, with each tuple containing text matched by all the capturing groups. The overall regex match is <i>not</i> included in the tuple, unless you place the entire regex inside a capturing group.</p> <p>More efficient than <tt class=code>re.findall()</tt> is <tt class=code>re.<b>finditer</b>(regex, subject)</tt>. It returns an iterator that enables you to loop over the regex matches in the subject string: <tt class=code>for m in re.finditer(regex, subject)</tt>. The for-loop variable <tt class=code>m</tt> is a <tt class=code>Match</tt> object with the details of the current match.</p> <p>Unlike <tt class=code>re.search()</tt> and <tt class=code>re.match()</tt>, <tt class=code>re.findall()</tt> and <tt class=code>re.finditer()</tt> do not support an optional third parameter with regex matching flags. Instead, you can use <A HREF="modifiers.html" TARGET="_top">global mode modifiers</A> at the start of the regex. E.g. “(?i)regex” matches <TT CLASS=syntax><SPAN CLASS="regexplain">regex</SPAN></TT> case insensitively.</p> <h2>Strings, Backslashes and Regular Expressions</h2> <p>The backslash is a <A HREF="characters.html" TARGET="_top">metacharacter</A> in regular expressions. It is used to escape other metacharacters. The regex <TT CLASS=syntax><SPAN CLASS="regexescaped">\\</SPAN></TT> matches a single backslash. <TT CLASS=syntax><SPAN CLASS="regexspecial">\d</SPAN></TT> is a <A HREF="shorthand.html" TARGET="_top">single token</A> matching a digit.</p> <p>Python strings also use the backslash to escape characters. The above regexes are written as Python strings as <tt>"\\\\"</tt> and <tt>"\\d"</tt>. Confusing indeed.</p> <p>Fortunately, Python also has “raw strings” which do not apply special treatment to backslashes. As raw strings, the above regexes become <tt>r"\\"</tt> and <tt>r"\d"</tt>. The only limitation of using raw strings is that the delimiter you’re using for the string must not appear in the regular expression, as raw strings do not offer a means to escape it.</p> <p>You can use \n and \t in raw strings. Though raw strings do not support these escapes, the regular expression engine does. The end result is the same.</p> <h2>Unicode</h2> <p>Prior to Python 3.3, Python’s re module did not support any <A HREF="unicode.html" TARGET="_top">Unicode regular expression tokens</A>. Python Unicode strings, however, have always supported the <tt>\uFFFF</tt> notation. Python’s re module can use Unicode strings. So you could pass the Unicode string <tt>u"\u00E0\\d"</tt> to the re module to match <tt class=match>à</tt> followed by a digit. The backslash for <TT CLASS=syntax><SPAN CLASS="regexspecial">\d</SPAN></TT> was escaped, while the one for <tt>\u</tt> was not. That’s because <TT CLASS=syntax><SPAN CLASS="regexspecial">\d</SPAN></TT> is a regular expression token, and a regular expression backslash needs to be escaped. <tt>\u00E0</tt> is a Python string token that shouldn’t be escaped. The string <tt>u"\u00E0\\d"</tt> is seen by the regular expression engine as <TT CLASS=syntax><SPAN CLASS="regexplain">à</SPAN><SPAN CLASS="regexspecial">\d</SPAN></TT>.</p> <p>If you did put another backslash in front of the <tt>\u</tt>, the regex engine would see <TT CLASS=syntax><SPAN CLASS="regexescaped">\u</SPAN><SPAN CLASS="regexplain">00E0</SPAN><SPAN CLASS="regexspecial">\d</SPAN></TT>. If you use this regex with Python 3.2 or earlier, it will match the literal text <tt class=match>u00E0</tt> followed by a digit instead.</p> <p>To avoid any confusion about whether backslashes need to be escaped, just use Unicode raw strings like <tt>ur"\u00E0\d"</tt>. Then backslashes don’t need to be escaped. Python does interpret Unicode escapes in raw strings.</p> <p>In Python 3.0 and later, strings are Unicode by default. So the <tt>u</tt> prefix shown in the above samples is no longer necessary. Python 3.3 also adds support for the <tt>\uFFFF</tt> notation to the regular expression engine. So in Python 3.3, you can use the string <tt>"\\u00E0\\d"</tt> to pass the regex <TT CLASS=syntax><SPAN CLASS="regexspecial">\u00E0</SPAN><SPAN CLASS="regexspecial">\d</SPAN></TT> which will match something like <tt class=match>à0</tt>.</p> <h2>Search and Replace</h2> <p><tt class=code>re.<b>sub</b>(regex, replacement, subject)</tt> performs a search-and-replace across subject, replacing all matches of regex in subject with replacement. The result is returned by the <tt class=code>sub()</tt> function. The subject string you pass is not modified.</p> <p>If the regex has <A HREF="brackets.html" TARGET="_top">capturing groups</A>, you can use the text matched by the part of the regex inside the capturing group. To substitute the text from the third group, insert <TT CLASS=syntax><SPAN CLASS="regexspecial">\3</SPAN></TT> into the replacement string. If you want to use the text of the third group followed by a literal three as the replacement, use <TT CLASS=syntax><SPAN CLASS="regexspecial">\g<3></SPAN><SPAN CLASS="replaceplain">3</SPAN></TT>. <TT CLASS=syntax><SPAN CLASS="regexerr">\33</SPAN></TT> is interpreted as the 33rd group. It is an error if there are fewer than 33 groups. If you used <A HREF="named.html" TARGET="_top">named capturing groups</A>, you can use them in the replacement text with <TT CLASS=syntax><SPAN CLASS="regexspecial">\g<name></SPAN></TT>.</p> <p>The <tt class=code>re.sub()</tt> function applies the same backslash logic to the replacement text as is applied to the regular expression. Therefore, you should use raw strings for the replacement text, as I did in the examples above. The <tt class=code>re.sub()</tt> function will also interpret \n and \t in raw strings. If you want <tt>c:\temp</tt> as a replacement, either use <tt class=code>r"c:\\temp"</tt> or <tt class=code>"c:\\\\temp"</tt>. The 3rd backreference is <tt class=code>r"\3"</tt> or <tt class=code>"\\3"</tt>.</p> <h2>Splitting Strings</h2> <p><tt class=code>re.<b>split</b>(regex, subject)</tt> returns an array of strings. The array contains the parts of subject between all the regex matches in the subject. Adjacent regex matches will cause empty strings to appear in the array. The regex matches themselves are not included in the array. If the regex contains <A HREF="brackets.html" TARGET="_top">capturing groups</A>, then the text matched by the capturing groups is included in the array. The capturing groups are inserted between the substrings that appeared to the left and right of the regex match. If you don’t want the capturing groups in the array, convert them into <A HREF="brackets.html" TARGET="_top">non-capturing groups</A>. The <tt class=code>re.split()</tt> function does not offer an option to suppress capturing groups.</p> <p>You can specify an optional third parameter to limit the number of times the subject string is split. Note that this limit controls the number of splits, not the number of strings that will end up in the array. The unsplit remainder of the subject is added as the final string to the array. If there are no capturing groups, the array will contain <tt class=code>limit+1</tt> items.</p> <p>The behavior of <tt class=code>re.split()</tt> has changed between Python versions when the regular expression can find zero-length matches. In Python 3.4 and prior, <tt class=code>re.split()</tt> ignores zero-length matches. In Python 3.5 and 3.6 <tt class=code>re.split()</tt> throws a FutureWarning when it encounters a zero-length match. This warning signals the change in Python 3.7. Now <tt class=code>re.split()</tt> also splits on zero-length matches.</p> <h2>Match Details</h2> <p><tt class=code>re.search()</tt> and <tt class=code>re.match()</tt> return a Match object, while <tt class=code>re.finditer()</tt> generates an iterator to iterate over a Match object. This object holds lots of useful information about the regex match. I will use <tt class=code>m</tt> to signify a Match object in the discussion below.</p> <p><tt class=code>m.<b>group</b>()</tt> returns the part of the string matched by the entire regular expression. <tt class=code>m.<b>start</b>()</tt> returns the offset in the string of the start of the match. <tt class=code>m.<b>end</b>()</tt> returns the offset of the character beyond the match. <tt class=code>m.<b>span</b>()</tt> returns a 2-tuple of <tt class=code>m.start()</tt> and <tt class=code>m.end()</tt>. You can use the <tt class=code>m.start()</tt> and <tt class=code>m.end()</tt> to slice the subject string: <tt class=code>subject[m.start():m.end()]</tt>.</p> <p>If you want the results of a capturing group rather than the overall regex match, specify the name or number of the group as a parameter. <tt class=code>m.group(3)</tt> returns the text matched by the third <A HREF="brackets.html" TARGET="_top">capturing group</A>. <tt class=code>m.group('groupname')</tt> returns the text matched by a <A HREF="named.html" TARGET="_top">named group</A> ‘groupname’. If the group did not participate in the overall match, <tt class=code>m.group()</tt> returns an empty string, while <tt class=code>m.start()</tt> and <tt class=code>m.end()</tt> return -1.</p> <p>If you want to do a regular expression based search-and-replace without using <tt class=code>re.sub()</tt>, call <tt class=code>m.<b>expand</b>(replacement)</tt> to compute the replacement text. The function returns the replacement string with backreferences etc. substituted.</p> <h2>Regular Expression Objects</h2> <p>If you want to use the same regular expression more than once, you should compile it into a regular expression object. Regular expression objects are more efficient, and make your code more readable. To create one, just call <tt class=code>re.<b>compile</b>(regex)</tt> or <tt class=code>re.<b>compile</b>(regex, flags)</tt>. The flags are the matching options described above for the <tt class=code>re.search()</tt> and <tt class=code>re.match()</tt> functions.</p> <p>The regular expression object returned by <tt class=code>re.compile()</tt> provides all the functions that the re module also provides directly: <tt class=code>search()</tt>, <tt class=code>match()</tt>, <tt class=code>findall()</tt>, <tt class=code>finditer()</tt>, <tt class=code>sub()</tt> and <tt class=code>split()</tt>. The difference is that they use the pattern stored in the regex object, and do not take the regex as the first parameter. <tt class=code>re.compile(regex).search(subject)</tt> is equivalent to <tt class=code>re.search(regex, subject)</tt>.</p><div id=cntmobi><p>| <a href='quickstart.html'>Quick Start</a> | <a href='tutorial.html'>Tutorial</a> | <a href='tools.html'>Tools & Languages</a> | <a href='examples.html'>Examples</a> | <a href='refflavors.html'>Reference</a> | <a href='books.html'>Book Reviews</a> |</p><p>| <a href='grep.html'>grep</a> | <a href='powergrep.html'>PowerGREP</a> | <a href='regexbuddy.html'>RegexBuddy</a> | <a href='regexmagic.html'>RegexMagic</a> |</p><p>| <a href='editpadlite.html'>EditPad Lite</a> | <a href='editpadpro.html'>EditPad Pro</a> |</p><p>| <a href='boost.html'>Boost</a> | <a href='delphi.html'>Delphi</a> | <a href='gnu.html'>GNU (Linux)</a> | <a href='groovy.html'>Groovy</a> | <a href='java.html'>Java</a> | <a href='javascript.html'>JavaScript</a> | <a href='dotnet.html'>.NET</a> | <a href='pcre.html'>PCRE (C/C++)</a> | <a href='pcre2.html'>PCRE2 (C/C++)</a> | <a href='perl.html'>Perl</a> | <a href='php.html'>PHP</a> | <a href='posix.html'>POSIX</a> | <a href='powershell.html'>PowerShell</a> | <a href='python.html'>Python</a> | <a href='rlanguage.html'>R</a> | <a href='ruby.html'>Ruby</a> | <a href='stdregex.html'>std::regex</a> | <a href='tcl.html'>Tcl</a> | <a href='vbscript.html'>VBScript</a> | <a href='vb.html'>Visual Basic 6</a> | <a href='wxwidgets.html'>wxWidgets</a> | <a href='xml.html'>XML Schema</a> | <a href='realbasic.html'>Xojo</a> | <a href='xpath.html'>XQuery & XPath</a> | <a href='xregexp.html'>XRegExp</a> |</p><p>| <a href='mysql.html'>MySQL</a> | <a href='oracle.html'>Oracle</a> | <a href='postgresql.html'>PostgreSQL</a> |</p></div> <div id=copyright> <P CLASS=copyright>Page URL: <A HREF="https://www.regular-expressions.info/python.html" TARGET="_top">https://www.regular-expressions.info/python.html</A><BR> Page last updated: 17 March 2023<BR> Site last updated: 06 November 2024<BR> Copyright © 2003-2024 Jan Goyvaerts. All rights reserved.</P> </div> </div> </div> </body></html>