Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

Parse String using RegEx REMatch

$
0
0

Why does this not return the variable form.item_cost to equal:199.99?

 

<CFSET string1 = "Here we have $199.99 is the price">

<CFSET form.item_cost = "#reMatchNoCase("^\d{0,4}(\.\d{1,2})?$",string1)#">

 

I only want to match the first price it sees in the string and return that value as a numeric decimal.


Viewing all articles
Browse latest Browse all 6243


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>