OK.  So here's what I think I've figured out.  It'll take more testing 
before I'm sure.

You can't use a positive lookahead before the main section.  I should 
have known this, given the name "lookahead", right?

CF does not support lookbehind.

As a workaround, you can grab the whole <input...> string, then do 
another check to find the name="..." bit.  Not efficient or elegant, but 
it should do the trick.

--Ben Doom

Larry Lyons wrote:
>> Something like:
>>
>> (?=<input.*?)name="[^"]+"
>>
>> I *think* that's the correct syntax.  This assumes you want to grab just 
>> the name="bob" part.  Let me know if you need something else, or (of 
>> course) if that isn't working right.
>>
>> --Ben
>>
> 
> Unfortunately it din't work. Here's an example input field
> <input type="hidden" name="name" value="setPreferredPaymentMethod"/>
> 
> When I do a refindNoCase('(?=<input.*?)name="[^"]+"',str,1) - where str is 
> the variable holding the input field, it returns a 0. 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1092
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to