Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When using Regular Expression search using VBA script in Excel to search Word
document, "-" character in the word document gets skiped (substituted with "" empty character). Here is the string in Word: <DE4.0<SWR4.4.l€‘CE6:A Here is the snipet of VBA code used: With Selector.Find .text = "\<DE?*^13" .Replacement.text = "" .Forward = True .Wrap = wdFindzz .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With While Selector.Find.Execute s = Selector.text Wend The search find the string in the Word and here is the resulting string in the VBA: <DE4.0<SWR4.4.lCE6:A As you can see the "-" hyphen character is missing in the resulting string and I can't understand why and how to fix it. Can someone help me with this? Thanks Alex |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
what are the regular expression special characters while searching | Excel Discussion (Misc queries) | |||
Regular expressions | Excel Programming | |||
Regular Expressions | Excel Programming | |||
Using Regular Expressions with VBA | Excel Programming | |||
Regular Expressions in VBA? | Excel Programming |