Example: This is field 10 of an STF segment.
|(888)451-3636CH~(812)887-4356CC~(747)787-0000CO~(812)884-8585CF~666CB~|
What i am wanting: ~(747)787-0000CO~(812)887-4356CC~(888)451-3636CH~(812)884-8585CF~666CB~|
The recieving system only takes the first number in the field and populates that number in its office phone number location. But that number isnt always the first number. It is the number witht he CO at the end. How can i search through the numbers and find the one with the CO if it exists and put it in the first position?
Here is what i have so far to pull out the phone fields:
set phone [lindex [split [lindex $STFList $STFPhoneNum] $repSep] 0]
Thanks for any help.