Since you know the input from the form(which you stated
cannot be changed), the following examples should work. Example 1
uses a regular expression to replace characters. Example 2 converts
beginning of a string to a number.
The regular expression in Example 1 replaces a-z and a blank
space. You can add to the regular expression if other characters
need to be replaced.
<cfset mylist = "126211 Graduate Certificate in
Banking,128511 Graduate Certificate in Entreprene">
<!--- EXAMPLE 1 --->
<cfset y = REReplaceNoCase(mylist,"[a-z ]","","ALL")>
<!--- LIST OF COMMA-DELIMITED NUMBERS --->
<cfoutput>#y#</cfoutput>
<br>
<!--- LOOP THRU LIST AND GET EACH NUMBER --->
<cfoutput>
<cfloop list="#y#" index="i">
<cfif IsNumeric(i)>
#i#<br>
</cfif>
</cfloop>
</cfoutput>
<!--- EXAMPLE 2 --->
<cfparam name="z" default="">
<cfloop list="#mylist#" index="i">
<cfif i NEQ ListLast(mylist)>
<!--- IF NOT LAST ITEM IN LIST, ADD COMMA --->
<cfset z = z & Val(i) & ",">
<cfelse>
<cfset z = z & Val(i)>
</cfif>
</cfloop>
<br>
<!--- LIST OF COMMA-DELIMITED NUMBERS --->
<cfoutput> #z#</cfoutput>