Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey guys,
I'm working with a regular expression to replace patterns in a given string. however I want to replace the patterns with another pattern using submatch references. ie: if my search pattern was "(\s)ks ?#?(\d*)(\s)" and my replacement pattern was "\1KS \2\3" I would expect " ks#12 " or " kS12 " to convert to " KS 12 " The regEx object has a replace method but it does the replacement as a literal string copy of the replacement pattern instead of using the submatches. This is easy to do with most other regEx implimentations I can think of. any Ideas? thanks in advance Shaun |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automated cut and paste using regex | Excel Worksheet Functions | |||
MS Query capabilities/regex | New Users to Excel | |||
RegEx in VBE code editor | Excel Programming | |||
Regex Question | Excel Programming | |||
regex string matching | Excel Programming |