![]() |
|
#1
|
|||
|
|||
|
Code:
Sub test()
Dim str As String
str = "str 9999 9999 str"
Dim RegExp As Object
Set RegExp = CreateObject("vbscript.regexp")
With RegExp
.IgnoreCase = True
.MultiLine = False
.Pattern = "[!0-9]"
.Global = True
End With
output = RegExp.Replace(str, "")
MsgBox output
Set RegExp = Nothing
End Sub
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
work vs regular work. and how regular work works
|
user0044 | Project | 5 | 03-06-2012 07:28 AM |
regular Expressions Formatting for Search
|
sesproul | Mail Merge | 1 | 11-30-2011 05:02 AM |
Access 2003 says unsafe expressions not blocked, but only some users on same computer
|
ZLA | Office | 3 | 07-23-2010 10:00 AM |
| Issue skipping characters by Regular Expressions in Word | pochtara | Word VBA | 0 | 04-01-2010 05:37 AM |
| How do I have headers and footers appear as regular text for the whole document? | user908045 | Word | 0 | 03-13-2010 12:41 PM |