1 Reply Latest reply on Sep 22, 2013 2:42 PM by Adam Cameron.

    Parse String using RegEx REMatch

    cwmcguire Level 1

      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.