Coldfusion: how to extract a substring using regex
Posted
by
justNeo
on Stack Overflow
See other posts from Stack Overflow
or by justNeo
Published on 2012-10-18T04:43:08Z
Indexed on
2012/10/18
5:02 UTC
Read the original article
Hit count: 236
I have a string that has some double quoted substring in it, the " character. In between the double quotes is the data i want.
How can i write a regex to extract "the first data i want" and "the second data i want" from this:
'some string with "the first data i want" and "the second data i want"'
I tried the following code.
<cfset mydata = 'some string with "the first data i want" and "the second data i want"'/>
<cfset arrData = ListToArray(mydata ,'"') />
© Stack Overflow or respective owner