Matching non-[a-zA-Z] characters in PHP regex
- by Bill X
I have some strings that need a-strippin':
ÃœT: 9.996636,76.294363
Tons of long strings of location codes. A literal regex in PHP won't match them, IE
$pattern = /ÃœT:/;
echo preg_replace($pattern, "", $row['location']);
Won't match/strip anything. (To know it's working, /T:/ does strip the last bit of that string). What's the encoding error going on here?
Alternately, I would accept a concise way to take out just the numbers.