Search and replace

J

Joanne

Someone is searching for the following string. Could you please explain the
"@" and the "\". I'm not quite sure what this means.

Thank you for your help.


"\*{3}[A-Za-z0-9]@\*{3}"
 
J

Jay Freedman

Joanne said:
Someone is searching for the following string. Could you please
explain the "@" and the "\". I'm not quite sure what this means.

Thank you for your help.


"\*{3}[A-Za-z0-9]@\*{3}"

This is a wildcard string. The two-character code \* means an actual
asterisk character The asterisk by itself is a wildcard meaning "any group
of characters", so the backslash says "don't treat the asterisk as a special
wildcard, just a plain asterisk".

The @ symbol means "one or more characters that match the preceding
expression", where the preceding expression is [A-Za-z0-9] which translates
as "any upper or lower case letter or digit".

See http://www.gmayor.com/replace_using_wildcards.htm for more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top