10-19-2007, 10:33 PM
|
#5 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Location: Arizona
Posts: 114
Thanks: 10
|
But how can I use preg_match() to clear out all the unwanted characters using regular expressions? For example, if I used:
PHP Code:
<?php $string = "!@#$abc"; echo preg_match("/^abc/", $string); ?>
That will output "abc", but what happens if I have for example "a!@#b!@#c", and try to use that same pattern? It wouldn't show any matches. So how could I do it using just preg_match?
|
|
|