Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Regular expressions
Hello,
The snippet of code below builds a new string "Newval" based on the pattern [A-Z] and that works fine but what if I wanted to exclude values . For example I could set a pattern of "[)(*&^]" how would I code it to exclude those values? With RegExp .Global = True .Pattern = "[A-Z]" End With Set Myrange = ActiveSheet.Range("A1:A10") For Each C In Myrange newval = "" Set Collection = RegExp.Execute(C.Value) For Each RegMatch In Collection newval = newval & RegMatch Next Next D |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Regular Expressions | Excel Programming | |||
Using Regular Expressions with VBA | Excel Programming | |||
Regular expressions | Excel Programming | |||
Regular Expressions in VBA? | Excel Programming | |||
VBA and Regular expressions | Excel Programming |