Most viewed recipes tagged "regex" and "python"http://code.activestate.com/recipes/tags/regex+python/views/2012-06-07T14:31:44-07:00ActiveState Code RecipesSimple Regular Expression Tester (Python)
2010-12-25T00:12:44-08:00Sunjay Varmahttp://code.activestate.com/recipes/users/4174115/http://code.activestate.com/recipes/577517-simple-regular-expression-tester/
<p style="color: grey">
Python
recipe 577517
by <a href="/recipes/users/4174115/">Sunjay Varma</a>
(<a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/line/">line</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/quick/">quick</a>, <a href="/recipes/tags/re/">re</a>, <a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/testing/">testing</a>).
Revision 2.
</p>
<p><strong><em>Is it possible to create a simple command line program that I can use to quickly test my regular expressions?</em></strong></p>
<p>Yes it is. This simple regular expression tester uses Python's re module as well as others to quickly allow you to test your regular expression in one go.</p>
<p>TODO:</p>
<ul>
<li>Add Support For Multiple Regular Expression Input</li>
</ul>
<p>Recent Changes:</p>
<ul>
<li>Made the output prettier with a little more whitespace. More bytes, but at least it's easier to read!</li>
</ul>
Minimalistic Word Wrap using Regex (Python)
2012-06-07T14:31:44-07:00Alfehttp://code.activestate.com/recipes/users/4182236/http://code.activestate.com/recipes/578162-minimalistic-word-wrap-using-regex/
<p style="color: grey">
Python
recipe 578162
by <a href="/recipes/users/4182236/">Alfe</a>
(<a href="/recipes/tags/minimalistic/">minimalistic</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/word/">word</a>, <a href="/recipes/tags/wrap/">wrap</a>).
</p>
<p>I know there is the module textwrap and other recipes like <a href="http://code.activestate.com/recipes/148061-one-liner-word-wrap-function/" rel="nofollow">http://code.activestate.com/recipes/148061-one-liner-word-wrap-function/</a></p>
<p>But in some constellations my recipe for a very simple word wrap might come in handy nevertheless.</p>