Let's say I've got a chunk of source code like so:

<form name="frmLogin" action="index.cfm?action=tomlinson.setTestForm" 
method="post">
  <table width="45%" align="left" border="0" cellpadding="5" cellspacing="1" 
class="subHeader">
   <tr valign="middle" bgcolor="ffffff">
    <td width="20%" align="right">Username</td>
    <td width="20%" align="left"><input class="req" type="text" name="usrID" 
size="20" value="#variables.frmData.usrID#" /></td>
   </tr>
 
etc... 

So it can have almost any kind of character in it. 

Now, let's say I want to check the beginning for whatever, in this case, I want 
a match if it has a newline or carriage return at the beginning. 

(?i)^[\r\s]+[.\r\s\S]*

With this regex i'm trying to say, look for the newline/tab/c.return at the 
start of the text, and allow ANYthing afterwards. I don't care what comes 
after, allow it. 

My problem is understanding the \S (non whitespace) in the 2nd []. If I remove 
it, I don't have a match. if I include it,I DO have a match. What is in that 
chunk of text that isn't being matched, that .\r\s won't match. 

What's the best way to say look, I don't care what comes AFTER this specific 
piece of the regex that matches. Allow EVERYthing.

Make sense?

Thanks,
Will  



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309232
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to