Gossamer Forum
Quote Reply
Reg. Exp

Who can point me to a GOOD regular expression help/tutorial?

Because I'm trying to spit up a string into text and numbers. The following working code spits up an european address "text text text text number text" into

street: text
housenumber: numbers

BUT I would like to have:

street: text before numbers
housenumber: numbers and text after numbers

tmp1 = input; tmp2 = input
tmp1 = tmp1.replace(/[0-9]/g,"").replace(/^\W+/g,"").replace(/\W+$/g,"")
tmp2 = tmp2.toLowerCase().replace(/[a-z]/g,"").replace(/^\W+/g,"").replace(/\W+$/g,"")

Thanks in advance,