How to Ignore Special Characters?

M

MatsonPP

Hello!

I have a textbox that I wish to only contain a-z, A-Z, and 0-9. Is this
possible to do easily?

Thanks!
Matt
 
M

mag31

Hi Matt,

Go to Properties/Data Validation/Add. Select does not match pattern. Then
select Custom Pattern and use the following pattern [\w\s]*. This matches
letters, numbers and spaces. For a different pattern you need to look up
Regular Expressions or Regex.

Finally, set your error message and ok everything.

Good Luck,
Mark Grant
Cambridge Convergence Limited
www.cambridgeconvergence.com
 
M

mag31

Certainly, [\w\s\-]*

- is typically used to represent a range i.e. a-z will match any symbol from
a through to z, therefore to represent a - you need to use an escape
character before it i.e. \-

Mark Grant
Cambridge Convergence Limited
www.cambridgeconvergence.com
 
M

MatsonPP

By apostraphe I meant ' as in Sam's Cat. That's one that I can't seem
to get working.
 

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