View Single Post
Old 03-01-2013, 06:45 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
But suppose the user enters "The gross national product of England averages 2,378,111,228 pounds per day."

???

That is a 10 digit number that looks like a phone number. What would you have the system do with it?

Or what would you do about "My phone number is eight zero zero five five five one two one two." ???

Anyway, if you simply want to reject all digits, I gave you the answer in the first post, excepting that you should remove the \s in there.

If you want to zap all digits, just use
Code:
    Set re = New RegExp
    re.Pattern = "\d"
    re.Global = True
    txt = re.Replace( txt, "" )
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.

Last edited by Old Pedant; 03-01-2013 at 06:50 PM..
Old Pedant is offline   Reply With Quote