Reqex Help

  • Thread starter Thread starter thomasp
  • Start date Start date
T

thomasp

How should I build a Regex that excepts only -12 through 12 integers only?
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12

Thanks

Thomas
 
thomasp@... said:
How should I build a Regex that excepts only -12 through 12 integers
only?

You should not. Regex is for strings, not numbers.

How about

if x >= -12 andAlso x <= 12 andAlso x = int(x) then
' do something
end if

Andrew
 
I am using the entry as text, but your suggestion will work fine.

Thanks

Thomas
 

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

Back
Top