i have one code which is troubling me:

var r={
'special':/[\W]/g,
'quotes':/['\''&'\"']/g,
'notnumbers':/[^\d]/g
}

function valid(o,w){
o.value = o.value.replace(r[w],'');
}


i want to add the space to the exclusion, like if i type:

67 home address p.o. kandal road dogggra

but when my focus moves out of the text, it
just do like tye below:

67homeaddresspokandalroaddogggra

it strips the spaces and the . attribute but i awant them both in the field, is something i can make a change in the above script to work fine...