abstract:
SELECT content
FROM module_master
WHERE site_id IN (721,1009)
</cfquery>
<cfloop query="findIDs">
<cfset found = REReplace(content, "/.*p_id=(\d+).*/", "\1", "all")>
<cfset ArrayAppend(test, found2)>
</cfloop>
Thanks for any help!
So, I'm trying to parse through a column and return all numbers found in it (their page id's). However, everything I've tried only returns one value and that's it. This is a sample of what the data looks like:
Code:- If you need help with anything please contact <a href="http://www.something.com/?p_id=54">HR</a> or use this form <a href="http://www.something.com/?p_id=32">here</a>.
Copy Code Right now I have this (Coldfusion is the langauge):
Code:- <cfset test = ArrayNew(1)>
- <cfquery name="findIDs" datasource="">
- SELECT content
- FROM module_master
- WHERE site_id IN (721,1009)
- </cfquery>
- <cfloop query="findIDs">
- <cfset found = REReplace(content, "/.*p_id=(\d+).*/", "\1", "all")>
- <cfset ArrayAppend(test, found2)>
- </cfloop>
Copy Code Thanks for any help! |