I am trying to extract telephone word numbers from free text.
The general format of the word number is ‘0800’ followed by at least 6 alphanumeric characters.
If there is more than one word required to get at least 6 alphanumeric charaters then return the full words.
examples I have:
‘PH 0800 OASIS CLEARWATER’ – return ‘0800 OASIS CLEARWATER’
‘Freephone 0800 RaceRock TM’ – return ‘0800 RaceRock’
‘Phone: 0800 7 5555 7’ – return ‘0800 7 5555 7’
I am using oracle 10.2.0.3 (10g)
cheers
The following regex should work:
It first matches 0800, then 6 alfanumeric characters, before each character you can have a number of spaces. After the sixth character you match additional characters, to get the whole word.
Be sure not to use
^or$as you obviously want it to be possible to have strings in front of it, and after it.