<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CornerPixel Blog - JavaScript</title>
    <link>http://blog.cornerpixel.net/</link>
    <description>Rant by Mike</description>
    <language>en-us</language>
    <copyright>2008-2009 CornerPixel LLC</copyright>
    <lastBuildDate>Fri, 04 Sep 2009 22:30:01 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>blog@cornerpixel.net</managingEditor>
    <webMaster>blog@cornerpixel.net</webMaster>
    <item>
      <trackback:ping>http://blog.cornerpixel.net/Trackback.aspx?guid=a6d28c55-176e-45e4-974e-9ae278caad3d</trackback:ping>
      <pingback:server>http://blog.cornerpixel.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.cornerpixel.net/PermaLink,guid,a6d28c55-176e-45e4-974e-9ae278caad3d.aspx</pingback:target>
      <dc:creator>Mike</dc:creator>
      <wfw:comment>http://blog.cornerpixel.net/CommentView,guid,a6d28c55-176e-45e4-974e-9ae278caad3d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.cornerpixel.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a6d28c55-176e-45e4-974e-9ae278caad3d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In JavaScript, a regular expression is written in the form of /pattern/modifiers where
"pattern" is the regular expression itself, and "modifiers" are
a series of characters indicating various options. The "modifiers" part
is optional. 
</p>
        <p>
    * /g enables "global" matching. When using the replace()
method, specify this modifier to replace all matches, rather than only the first one. 
<br />
    * /i makes the regex match case insensitive. 
<br />
    * /m enables "multi-line mode". In this mode, the caret
and dollar match before and after newlines in the subject string. 
</p>
        <p>
You can combine multiple modifiers by stringing them together as in /regex/gim. 
</p>
        <p>
Since forward slashes delimit the regular expression, any forward slashes that appear
in the regex need to be escaped. For example, the regex 1/2 is written as /1\/2/ in
JavaScript.
</p>
        <p>
As with anything, you can find much more information about <a href="http://www.regular-expressions.info/javascript.html" target="_blank">JavaScript</a> on
the web if you <a href="http://www.google.com/search?rlz=1C1GGLS_enUS340US340&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=JavaScript+Regex+Syntax" target="_blank">Google</a> or <a href="http://www.bing.com/search?q=JavaScript+Regex+Syntax&amp;go=&amp;form=QBLH&amp;qs=n" target="_blank">Bing</a> it.  
</p>
        <img width="0" height="0" src="http://blog.cornerpixel.net/aggbug.ashx?id=a6d28c55-176e-45e4-974e-9ae278caad3d" />
      </body>
      <title>JavaScript's Regular Expression Syntax</title>
      <guid isPermaLink="false">http://blog.cornerpixel.net/PermaLink,guid,a6d28c55-176e-45e4-974e-9ae278caad3d.aspx</guid>
      <link>http://blog.cornerpixel.net/2009/09/04/JavaScripts+Regular+Expression+Syntax.aspx</link>
      <pubDate>Fri, 04 Sep 2009 22:30:01 GMT</pubDate>
      <description>&lt;p&gt;
In JavaScript, a regular expression is written in the form of /pattern/modifiers where
&amp;quot;pattern&amp;quot; is the regular expression itself, and &amp;quot;modifiers&amp;quot; are
a series of characters indicating various options. The &amp;quot;modifiers&amp;quot; part
is optional. 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; * /g enables &amp;quot;global&amp;quot; matching. When using the replace()
method, specify this modifier to replace all matches, rather than only the first one. 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; * /i makes the regex match case insensitive. 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; * /m enables &amp;quot;multi-line mode&amp;quot;. In this mode, the caret
and dollar match before and after newlines in the subject string. 
&lt;/p&gt;
&lt;p&gt;
You can combine multiple modifiers by stringing them together as in /regex/gim. 
&lt;/p&gt;
&lt;p&gt;
Since forward slashes delimit the regular expression, any forward slashes that appear
in the regex need to be escaped. For example, the regex 1/2 is written as /1\/2/ in
JavaScript.
&lt;/p&gt;
&lt;p&gt;
As with anything, you can find much more information about &lt;a href="http://www.regular-expressions.info/javascript.html" target="_blank"&gt;JavaScript&lt;/a&gt; on
the web if you &lt;a href="http://www.google.com/search?rlz=1C1GGLS_enUS340US340&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=JavaScript+Regex+Syntax" target="_blank"&gt;Google&lt;/a&gt; or &lt;a href="http://www.bing.com/search?q=JavaScript+Regex+Syntax&amp;amp;go=&amp;amp;form=QBLH&amp;amp;qs=n" target="_blank"&gt;Bing&lt;/a&gt; it.&amp;#160; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.cornerpixel.net/aggbug.ashx?id=a6d28c55-176e-45e4-974e-9ae278caad3d" /&gt;</description>
      <comments>http://blog.cornerpixel.net/CommentView,guid,a6d28c55-176e-45e4-974e-9ae278caad3d.aspx</comments>
      <category>Code</category>
      <category>JavaScript</category>
      <category>jQuery</category>
    </item>
  </channel>
</rss>