I have the following text: "my brother drunk 7 cups of coffee and then printed his homework in A4 paper. He then drove down the I-90 highway."
I want to extract only the numbers of the text (in this example 7,4,90). How can I do this with coldfusion?
I suspect the REMatch function must be used but I am not good with regular expressions, I appreciate everyone's help.
Just use rematch and this will return array of match numbers.
<cfset str = "my brother drunk 7 cups of coffee and then printed his homework in A4 paper. He then drove down the I-90 highway">
<cfset arrSearch = rematch("[\d]+",str)>
<cfdump var="#arrSearch#">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With