<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/regex</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 24 Jul 2008 02:46:39 GMT</pubDate>
<item>
<title>(Other) python search-replace on a match with n non-nested groups - vasilije</title>
<link>http://snipplr.com/view/7464/python-searchreplace-on-a-match-with-n-nonnested-groups/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 23 Jul 2008 14:51:43 GMT</pubDate>
<guid>http://snipplr.com/view/7464/python-searchreplace-on-a-match-with-n-nonnested-groups/</guid>
</item>
<item>
<title>(Ruby) Match Single-line Javascript Comments - mikegreen</title>
<link>http://snipplr.com/view/7130/match-singleline-javascript-comments/</link>
<description><![CDATA[ <p>Matches single line Javascript (and PHP, etc.) comments</p> ]]></description>
<pubDate>Sat, 05 Jul 2008 00:37:26 GMT</pubDate>
<guid>http://snipplr.com/view/7130/match-singleline-javascript-comments/</guid>
</item>
<item>
<title>(Regular Expression) Match CSS and JS Comments - mikegreen</title>
<link>http://snipplr.com/view/7129/match-css-and-js-comments/</link>
<description><![CDATA[ <p>Matches CSS-style comments spanning one or multiple lines</p> ]]></description>
<pubDate>Sat, 05 Jul 2008 00:32:30 GMT</pubDate>
<guid>http://snipplr.com/view/7129/match-css-and-js-comments/</guid>
</item>
<item>
<title>(Bash) Words with many doubled letters - zingo</title>
<link>http://snipplr.com/view/7056/words-with-many-doubled-letters/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 01 Jul 2008 19:28:07 GMT</pubDate>
<guid>http://snipplr.com/view/7056/words-with-many-doubled-letters/</guid>
</item>
<item>
<title>(PHP) Count sentences in a string - evanwalsh</title>
<link>http://snipplr.com/view/6910/count-sentences-in-a-string/</link>
<description><![CDATA[ <p>This will count sentences that end in . or ? or ! and have a space after them.</p> ]]></description>
<pubDate>Wed, 25 Jun 2008 11:35:01 GMT</pubDate>
<guid>http://snipplr.com/view/6910/count-sentences-in-a-string/</guid>
</item>
<item>
<title>(JavaScript) Regular Expressions For URI Validation/Parsing - wizard04</title>
<link>http://snipplr.com/view/6889/regular-expressions-for-uri-validationparsing/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 24 Jun 2008 16:20:14 GMT</pubDate>
<guid>http://snipplr.com/view/6889/regular-expressions-for-uri-validationparsing/</guid>
</item>
<item>
<title>(Bash) grep for either of two strings - noah</title>
<link>http://snipplr.com/view/6819/grep-for-either-of-two-strings/</link>
<description><![CDATA[ <p>Here's an example of using grep to filter for links that contain the string 'jpg' or 'gif'</p> ]]></description>
<pubDate>Fri, 20 Jun 2008 15:29:33 GMT</pubDate>
<guid>http://snipplr.com/view/6819/grep-for-either-of-two-strings/</guid>
</item>
<item>
<title>(Regular Expression) Remove multiple spaces from string - indianocean</title>
<link>http://snipplr.com/view/6760/remove-multiple-spaces-from-string/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 18 Jun 2008 09:19:12 GMT</pubDate>
<guid>http://snipplr.com/view/6760/remove-multiple-spaces-from-string/</guid>
</item>
<item>
<title>(Regular Expression) Prime number tester - banzaiman</title>
<link>http://snipplr.com/view/6713/prime-number-tester/</link>
<description><![CDATA[ <p>By the legendary abigail.  Fails to match if and only if it is matched against a prime number of 1's.  That is, '11' fails, but '1111' does not.

I once heard him talk why this works, but I forgot most of it.</p> ]]></description>
<pubDate>Sat, 14 Jun 2008 11:02:12 GMT</pubDate>
<guid>http://snipplr.com/view/6713/prime-number-tester/</guid>
</item>
<item>
<title>(Regular Expression) Grab any unclosed XHTML img tags - egoens</title>
<link>http://snipplr.com/view/6632/grab-any-unclosed-xhtml-img-tags/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 09 Jun 2008 12:56:23 GMT</pubDate>
<guid>http://snipplr.com/view/6632/grab-any-unclosed-xhtml-img-tags/</guid>
</item>
<item>
<title>(JavaScript) urlsToAnchors - juliend2</title>
<link>http://snipplr.com/view/6449/urlstoanchors/</link>
<description><![CDATA[ <p>To use this snippet, you have to pass a DOM element to the urlsToAnchors function. This function then returns a string of the new generated HTML. This html contains the links for the urls that were in text.</p> ]]></description>
<pubDate>Sat, 24 May 2008 22:42:31 GMT</pubDate>
<guid>http://snipplr.com/view/6449/urlstoanchors/</guid>
</item>
<item>
<title>(PHP) Censor bad words with regexp - oso96_2000</title>
<link>http://snipplr.com/view/6332/censor-bad-words-with-regexp/</link>
<description><![CDATA[ <p>This function uses the power of regexp to check if some bad word are on the text, also offers the posibility to change those word for something else. Examples:

$texto = 'fuck off!';
filtrado($texto); returns true since a bad word has been found on the text
filtrado($texto, '[censored]'); //returns [censored] off!

And because regexp, this will work with something like "fck off!". You can see a more detailed example here:
http://www.otaku-anime.com/varios/filtro.php -- Example
http://www.otaku-anime.com/varios/filtro.php?source -- Source code of the example</p> ]]></description>
<pubDate>Mon, 19 May 2008 16:39:57 GMT</pubDate>
<guid>http://snipplr.com/view/6332/censor-bad-words-with-regexp/</guid>
</item>
<item>
<title>(Ruby) remove non-word characters - inkdeep</title>
<link>http://snipplr.com/view/5795/remove-nonword-characters/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 12 Apr 2008 14:21:46 GMT</pubDate>
<guid>http://snipplr.com/view/5795/remove-nonword-characters/</guid>
</item>
<item>
<title>(Ruby) spaces to dashes - inkdeep</title>
<link>http://snipplr.com/view/5794/spaces-to-dashes/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 12 Apr 2008 14:20:59 GMT</pubDate>
<guid>http://snipplr.com/view/5794/spaces-to-dashes/</guid>
</item>
<item>
<title>(PHP) Replace a URL with its domain name and create link - jaytee</title>
<link>http://snipplr.com/view/5759/replace-a-url-with-its-domain-name-and-create-link/</link>
<description><![CDATA[ <p>Worst title ever.  Basically, this takes a string like:
"Check this out: http://snipplr.com/view/5759/replace-a-url-its-domain-name-and-create-link/" and replaces it with "Check this out: snipplr.com [with a link to the full URL]"</p> ]]></description>
<pubDate>Wed, 09 Apr 2008 17:48:06 GMT</pubDate>
<guid>http://snipplr.com/view/5759/replace-a-url-with-its-domain-name-and-create-link/</guid>
</item>
<item>
<title>(Ruby) Regex replace - noah</title>
<link>http://snipplr.com/view/5560/regex-replace/</link>
<description><![CDATA[ <p>Equivalent of the Perl code: url =~ s/foo/bar/</p> ]]></description>
<pubDate>Tue, 25 Mar 2008 14:09:21 GMT</pubDate>
<guid>http://snipplr.com/view/5560/regex-replace/</guid>
</item>
<item>
<title>(PHP) UK postcode parser - naz</title>
<link>http://snipplr.com/view/5464/uk-postcode-parser/</link>
<description><![CDATA[ <p>This function can validate and parse UK postcode like SW1A 1AA in to formated array.</p> ]]></description>
<pubDate>Mon, 17 Mar 2008 15:11:57 GMT</pubDate>
<guid>http://snipplr.com/view/5464/uk-postcode-parser/</guid>
</item>
<item>
<title>(JavaScript) Check if a url contains a subdomain - scriptmakingcom</title>
<link>http://snipplr.com/view/5449/check-if-a-url-contains-a-subdomain/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 16 Mar 2008 16:56:31 GMT</pubDate>
<guid>http://snipplr.com/view/5449/check-if-a-url-contains-a-subdomain/</guid>
</item>
<item>
<title>(Ruby) Use regex to match a Ruby substring, and reference it like an index - cczona</title>
<link>http://snipplr.com/view/5420/use-regex-to-match-a-ruby-substring-and-reference-it-like-an-index/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 13 Mar 2008 21:41:41 GMT</pubDate>
<guid>http://snipplr.com/view/5420/use-regex-to-match-a-ruby-substring-and-reference-it-like-an-index/</guid>
</item>
<item>
<title>(Regular Expression) US Phone Number with extension, flexible - martinkas</title>
<link>http://snipplr.com/view/5407/us-phone-number-with-extension-flexible/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 13 Mar 2008 15:07:31 GMT</pubDate>
<guid>http://snipplr.com/view/5407/us-phone-number-with-extension-flexible/</guid>
</item>
</channel>
</rss>