English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

In perl?

s|[A-Z0-9]| |ig
or:
s|[[:alnum:]]| |g

If you do case-insensitive compare, you don't have to specify A-Z and a-z as separate ranges.

POSIX regexs allow multiple character ranges inside a single [], so you don't have to specify them separately, and most regular expression libraries implement it that way as well. Also, "alnum" (alphanumeric) is a standard character class that can be used.

2007-06-28 09:39:29 · answer #1 · answered by McFate 7 · 1 0

Sniff Sniff, I sniff a homework :)

I'll answer any way

[a-z]|[A-Z]|[0-9] to match the string, then you need to use what ever RegEx library to replace it
Every different language or Technology has its own syntax, wild-cards and functions to find and replace using RegEx

2007-06-28 16:22:31 · answer #2 · answered by wamra 2 · 0 0

fedest.com, questions and answers