<?xml version="1.0" encoding="windows-1252"?>
<node id="961015" title="Re: A regular expression" created="2012-03-22 09:38:11" updated="2012-03-22 09:38:11">
<type id="11">
note</type>
<author id="10261">
dorko</author>
<data>
<field name="doctext">
I use [mod://YAPE::Regex::Explain] to explain Regular Expressions:

&lt;code&gt;
use YAPE::Regex::Explain;
print YAPE::Regex::Explain-&gt;new(qr/999[89]\$/)-&gt;explain();

__END__

The regular expression:

(?-imsx:999[89]\$)

matches as follows:
  
NODE                     EXPLANATION
----------------------------------------------------------------------
(?-imsx:                 group, but do not capture (case-sensitive)
                         (with ^ and $ matching normally) (with . not
                         matching \n) (matching whitespace and #
                         normally):
----------------------------------------------------------------------
  999                      '999'
----------------------------------------------------------------------
  [89]                     any character of: '8', '9'
----------------------------------------------------------------------
  \$                       '$'
----------------------------------------------------------------------
)                        end of grouping
----------------------------------------------------------------------
&lt;/CODE&gt;


&lt;P&gt;
Cheers,&lt;P&gt;
Brent&lt;BR&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-10261"&gt;
&lt;I&gt;-- Yeah, I'm a &lt;A HREF="http://www.delts.org/"&gt;Delt&lt;/A&gt;.&lt;/I&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
961008</field>
<field name="parent_node">
961008</field>
</data>
</node>
