Merlin Morgenstern wrote:
> Hi there,
>
> I am trying to filter out content that is not ascii. Can I do this with
> regex? For example:
>
> $regex = '[AZ][09]';
> if (preg_match($regex, $text)) {
> return TRUE;
> }
> else {
> return FALSE;
> }
>
> The reason I
Merlin Morgenstern wrote:
> Hi there,
>
> I am trying to filter out content that is not ascii. Can I do this with
> regex? For example:
>
> $regex = '[AZ][09]';
> if (preg_match($regex, $text)) {
> return TRUE;
> }
> else {
> return FALSE;
> }
>
> The reason I
Hi Merlin,
I think the pattern you're looking for is '/[a-zA-Z0-9]/' which will
match all alphanumeric characters.
Cheers
Stuart
On 30 Jul 2009, at 19:13, Merlin Morgenstern wrote:
Hi there,
I am trying to filter out content that is not ascii. Can I do this
with regex? For example:
Hi there,
I am trying to filter out content that is not ascii. Can I do this with
regex? For example:
$regex = '[AZ][09]';
if (preg_match($regex, $text)) {
return TRUE;
}
else {
return FALSE;
}
The reason I need to do thi
4 matches
Mail list logo