<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://regexblogs.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Flagrant Badassery</title><link>http://regexblogs.com/blogs/flagrant_badassery/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 (Build: 60809.935)</generator><item><title>XRegExp 0.5: JavaScript regex library</title><link>http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx</link><pubDate>Mon, 21 Apr 2008 09:32:00 GMT</pubDate><guid isPermaLink="false">d291b357-6366-4006-9008-4266c301325a:41549</guid><dc:creator>Stevezilla00</dc:creator><slash:comments>0</slash:comments><comments>http://regexblogs.com/blogs/flagrant_badassery/comments/41549.aspx</comments><wfw:commentRss>http://regexblogs.com/blogs/flagrant_badassery/commentrss.aspx?PostID=41549</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://stevenlevithan.com/regex/xregexp/"&gt;XRegExp&lt;/a&gt; is a JavaScript library that provides an augmented, cross-browser implementation of regular expressions, including support for additional modifiers and syntax. Several convenience methods and a new, powerful recursive-construct parser that uses regex delimiters are also included.&lt;/p&gt;&lt;p&gt;Here&amp;#39;s the feature list:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Added regex syntax: &lt;ul&gt;&lt;li&gt;Comprehensive named capture support.&lt;/li&gt;&lt;li&gt;Comment patterns: &lt;code&gt;(?#&amp;hellip;)&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Added regex modifiers (flags): &lt;ul&gt;&lt;li&gt;&lt;code&gt;s&lt;/code&gt; (&lt;i&gt;singleline&lt;/i&gt;), to make dot match all characters including newlines.&lt;/li&gt;&lt;li&gt;&lt;code&gt;x&lt;/code&gt; (&lt;i&gt;extended&lt;/i&gt;), for free-spacing and comments.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Added awesome: &lt;ul&gt;&lt;li&gt;Reduced cross-browser inconsistencies.&lt;/li&gt;&lt;li&gt;Recursive-construct parser with regex delimiters.&lt;/li&gt;&lt;li&gt;An easy way to cache and reuse regex objects.&lt;/li&gt;&lt;li&gt;The ability to safely embed literal text in your regex patterns.&lt;/li&gt;&lt;li&gt;A method to add modifiers to existing regex objects.&lt;/li&gt;&lt;li&gt;Regex &lt;code&gt;call&lt;/code&gt; and &lt;code&gt;apply&lt;/code&gt; methods, which make generically working with functions and regexes easier.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;All of this can be yours for the low, low price of 2.4 KB. :-) Version 0.5 also introduces extensive documentation and code examples. Get it while it&amp;#39;s hot! &lt;a href="http://stevenlevithan.com/regex/xregexp/"&gt;&lt;b&gt;XRegExp: JavaScript regular expression library&lt;/b&gt;&lt;/a&gt;. &lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx&amp;amp;;subject=XRegExp+0.5%3a+JavaScript+regex+library" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx&amp;amp;;title=XRegExp+0.5%3a+JavaScript+regex+library" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx&amp;amp;title=XRegExp+0.5%3a+JavaScript+regex+library" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx&amp;amp;;title=XRegExp+0.5%3a+JavaScript+regex+library" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx&amp;amp;;title=XRegExp+0.5%3a+JavaScript+regex+library&amp;amp;;top=1" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2008/04/21/XRegExp-0.5_3A00_-JavaScript-regex-library_2C00_-now-with-more-awesome.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://regexblogs.com/aggbug.aspx?PostID=41549" width="1" height="1"&gt;</description></item><item><title>RegexPal: Web-Based Regex Testing Reinvented</title><link>http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx</link><pubDate>Mon, 06 Aug 2007 19:10:00 GMT</pubDate><guid isPermaLink="false">d291b357-6366-4006-9008-4266c301325a:33603</guid><dc:creator>Stevezilla00</dc:creator><slash:comments>0</slash:comments><comments>http://regexblogs.com/blogs/flagrant_badassery/comments/33603.aspx</comments><wfw:commentRss>http://regexblogs.com/blogs/flagrant_badassery/commentrss.aspx?PostID=33603</wfw:commentRss><description>
&lt;p&gt;Yes I know, there are many other &lt;a href="http://regexpal.com/"&gt;JavaScript regex testers&lt;/a&gt; available. Why did I create yet another? &lt;a href="http://regexpal.com/"&gt;RegexPal&lt;/a&gt; brings several new things to the table for such web-based apps, and in my (biased) opinion it&amp;#39;s easier to use and more helpful towards learning regular expressions than the others currently available. Additionally, most other such tools are very slow for the kind of data I often work with. They might appear fast when displaying 10 matches, but what about 100 matches, 1000, or 5000? Try generating 5,000 matches (which is easy to do with a regex consisting of a single dot, or similar) in your favorite existing web-based tool and see if your browser ever recovers (doubtful). The same task takes RegexPal less than half a second, and what&amp;#39;s more, results are overlaid on the actual text you&amp;#39;re typing.&lt;/p&gt;

&lt;p&gt;At the moment, RegexPal is fairly short on features, but here are the highlights:&lt;/p&gt;

&lt;ul&gt;
	
&lt;li&gt;Real-time regex syntax highlighting with backwards and forwards context awareness.&lt;/li&gt;
	
&lt;li&gt;Lightning-fast match highlighting with alternating styles.&lt;/li&gt;
	
&lt;li&gt;Inverted matches (match any text not matched by the regex).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A few things to be aware of:&lt;/p&gt;

&lt;ul&gt;
	
&lt;li&gt;The approach I&amp;#39;ve used for scrollable rich-text editing (which I haven&amp;#39;t seen elsewhere on the web) is a bit buggy (but it&amp;#39;s fast). Firefox and IE7 have the least issues, but it more or less works in other browsers as well.&lt;/li&gt;
	
&lt;li&gt;With the syntax highlighting, I generally mark corner-case issues which create cross-browser inconsistencies as errors even if they are the result of browser bugs or missing behavior documentation in ECMA-262v3.&lt;/li&gt;
	
&lt;li&gt;There are different forms of lines breaks cross-platform/browser. E.g., Firefox uses &lt;code&gt;\n&lt;/code&gt; even on Windows where nearly all programs use &lt;code&gt;\r\n&lt;/code&gt;. This can affect the results of certain regexes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RegexPal, at least for me, is lots of fun to play with and helps to make learning regular expressions easy through its instant feedback. Check it out at &lt;a href="http://regexpal.com/" title="regex tester"&gt;&lt;b&gt;regexpal.com&lt;/b&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx&amp;amp;;subject=RegexPal%3a+Web-Based+Regex+Testing+Reinvented" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx&amp;amp;;title=RegexPal%3a+Web-Based+Regex+Testing+Reinvented" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx&amp;amp;title=RegexPal%3a+Web-Based+Regex+Testing+Reinvented" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx&amp;amp;;title=RegexPal%3a+Web-Based+Regex+Testing+Reinvented" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx&amp;amp;;title=RegexPal%3a+Web-Based+Regex+Testing+Reinvented&amp;amp;;top=1" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/08/06/RegexPal_3A00_-Web_2D00_Based-Regex-Testing-Reinvented.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://regexblogs.com/aggbug.aspx?PostID=33603" width="1" height="1"&gt;</description><category domain="http://regexblogs.com/blogs/flagrant_badassery/archive/tags/javascript/default.aspx">javascript</category></item><item><title>Mimicking Conditionals</title><link>http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx</link><pubDate>Fri, 01 Jun 2007 23:00:00 GMT</pubDate><guid isPermaLink="false">d291b357-6366-4006-9008-4266c301325a:30122</guid><dc:creator>Stevezilla00</dc:creator><slash:comments>0</slash:comments><comments>http://regexblogs.com/blogs/flagrant_badassery/comments/30122.aspx</comments><wfw:commentRss>http://regexblogs.com/blogs/flagrant_badassery/commentrss.aspx?PostID=30122</wfw:commentRss><description>
&lt;p&gt;Excited by the fact that I can &lt;a href="http://blog.stevenlevithan.com/regular-expressions/mimic-atomic-groups/"&gt;mimic atomic groups&lt;/a&gt; when using most regex libraries which don&amp;#39;t support them, I set my sights on another of my most wanted features which is commonly lacking: &lt;a href="http://www.regular-expressions.info/conditional.html"&gt;conditionals&lt;/a&gt; (which provide an if-then-else construct). Of the regex libraries I&amp;#39;m familiar with, conditionals are only supported by .NET, Perl, PCRE (and hence, PHP&amp;#39;s preg functions), and JGSoft products (including RegexBuddy).&lt;/p&gt;

&lt;p&gt;There are two common types of regex conditionals in those libraries: lookaround-based and capturing-group-based. I&amp;#39;ll get to the former type in a bit, but first, I&amp;#39;ll address capturing-group-based conditionals, which are able to base logic on whether an optional capturing group has participated in the match so far. Here&amp;#39;s an example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(a)?b(?(1)c|d)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That matches only &amp;quot;bd&amp;quot; and &amp;quot;abc&amp;quot;. The pattern can be expressed as follows:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(if_matched)?inner_pattern(?(1)then|else)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s a comparable pattern I created which doesn&amp;#39;t require support for conditionals:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(?=(a)()|())\1?b(?:\2c|\3d)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Note that to use it without an &amp;quot;else&amp;quot; part, you still need to include the second empty backreference (in this case, &amp;quot;&lt;code&gt;\3&lt;/code&gt;&amp;quot;) at the end, like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(?=(a)()|())\1?b(?:\2c|\3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As a brief explanation of how that works, there&amp;#39;s an empty alternation option within the lookahead at the beginning which is used to cancel the effect of the lookahead, while at the same time, the intentionally empty capturing groups within the alternation are exploited to base the then/else part on which option in the lookahead matched. However, there are a couple issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This doesn&amp;#39;t work with some regex engines, due to how they handle backreferences for non-participating capturing groups. For example, this does not work in Firefox, which treats non-participating capturing groups as if they matched an empty string.&lt;/li&gt;

&lt;li&gt;It interacts with backtracking differently than a real conditonal (the &amp;quot;a&amp;quot; part is treated as if it were within an optional, atomic group, e.g., &lt;code&gt;(?&amp;gt;(a))?&lt;/code&gt; instead of &lt;code&gt;(a)?&lt;/code&gt;), so it&amp;#39;s best to think of this as a new operator which is similar to a conditional.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As for lookaround-based conditionals, we can mimic them using the same concepts. Here&amp;#39;s what real lookaround-based conditionals look like (this example uses a positive lookahead for the assertion):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(?(?=if_assertion)then|else)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And here&amp;#39;s how you can mimic it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(?:(?=if_assertion()|())\1then|\2else)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Again, to use it without an &amp;quot;else&amp;quot; part, you still need to include the second empty backreference (in this case, &amp;quot;&lt;code&gt;\2&lt;/code&gt;&amp;quot;) at the end, like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(?:(?=if_assertion()|())\1then|\2)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backtracking does not come into play with lookaround-based conditionals in the same way as with capturing-group-based conditionals. As a result, mimicked lookaround-based conditionals are functionally identical to their &amp;quot;real&amp;quot; counterparts.&lt;/li&gt;

&lt;li&gt;&lt;code&gt;(?:(?=if_assertion()|())\1then|\2else)&lt;/code&gt; is functionally equivalent to &lt;code&gt;(?=if_assertion()|())(?:\1then|\2else)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a compatibility table detailing support for these constructs with all the regex engines I&amp;#39;ve tested them with, see &lt;a href="http://blog.stevenlevithan.com/regular-expressions/mimic-conditionals/"&gt;StevenLevithan.com: Mimicking Regular Expression Conditionals&lt;/a&gt;.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx&amp;amp;;subject=Mimicking+Conditionals" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx&amp;amp;;title=Mimicking+Conditionals" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx&amp;amp;title=Mimicking+Conditionals" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx&amp;amp;;title=Mimicking+Conditionals" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx&amp;amp;;title=Mimicking+Conditionals&amp;amp;;top=1" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/06/01/Mimicking-Conditionals.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://regexblogs.com/aggbug.aspx?PostID=30122" width="1" height="1"&gt;</description><category domain="http://regexblogs.com/blogs/flagrant_badassery/archive/tags/mimicking+features/default.aspx">mimicking features</category></item><item><title>XRegExp: An Extended JavaScript Regex Constructor</title><link>http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx</link><pubDate>Thu, 31 May 2007 00:19:00 GMT</pubDate><guid isPermaLink="false">d291b357-6366-4006-9008-4266c301325a:30041</guid><dc:creator>Stevezilla00</dc:creator><slash:comments>0</slash:comments><comments>http://regexblogs.com/blogs/flagrant_badassery/comments/30041.aspx</comments><wfw:commentRss>http://regexblogs.com/blogs/flagrant_badassery/commentrss.aspx?PostID=30041</wfw:commentRss><description>&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;I have recently written an extended JavaScript regular expression constructor 
which I&amp;rsquo;ve called XRegExp. This script is very small (the minified version weighs in at 937 bytes), and it adds support for two simple but powerful additional flags 
beyond those JavaScript supports natively:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;span&gt;&lt;font face="Times New Roman" size="1"&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;s &amp;ndash; Dot matches all (a.k.a., 
single-line) mode.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;x &amp;ndash; Free-spacing and comments mode.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;


&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;It also allows you to use these 
flags with the RegExp constructor itself after running one line of code. 
Additionally, XRegExp improves some minor cross-browser regex syntax consistency 
issues.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Full deets and extensive documentation is available at &lt;a href="http://blog.stevenlevithan.com/regular-expressions/xregexp-javascript-regex-constructor/"&gt;XRegExp: JavaScript Regular Expression Constructor&lt;/a&gt;, or you can just download the script (&lt;a href="http://stevenlevithan.com/regex/xregexp/xregexp.js"&gt;with comments&lt;/a&gt;, or &lt;a href="http://stevenlevithan.com/regex/xregexp/xregexp-min.js"&gt;minified&lt;/a&gt;).&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Regexes built using XRegExp are 
identical in speed to those built using the native RegExp constructor, support 
all of JavaScript&amp;rsquo;s regex syntax and regex-related methods, and should work in 
JavaScript 1.5+ browsers (tested in IE 5.5&amp;ndash;7, Firefox 2, and Opera 
9).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx&amp;amp;;subject=XRegExp%3a+An+Extended+JavaScript+Regex+Constructor" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx&amp;amp;;title=XRegExp%3a+An+Extended+JavaScript+Regex+Constructor" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx&amp;amp;title=XRegExp%3a+An+Extended+JavaScript+Regex+Constructor" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx&amp;amp;;title=XRegExp%3a+An+Extended+JavaScript+Regex+Constructor" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx&amp;amp;;title=XRegExp%3a+An+Extended+JavaScript+Regex+Constructor&amp;amp;;top=1" target="_blank" title = "Post http://regexblogs.com/blogs/flagrant_badassery/archive/2007/05/30/XRegExp_3A00_-An-Extended-JavaScript-Regex-Constructor.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://regexblogs.com/aggbug.aspx?PostID=30041" width="1" height="1"&gt;</description><category domain="http://regexblogs.com/blogs/flagrant_badassery/archive/tags/javascript/default.aspx">javascript</category></item></channel></rss>