Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Issue skiping characters by Regular Expressions searching Word

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what are the regular expression special characters while searching Howdy Excel Discussion (Misc queries) 3 January 18th 10 02:04 PM
Regular expressions Dave Excel Programming 5 September 20th 07 02:46 PM
Regular Expressions sl Excel Programming 2 January 22nd 07 11:27 PM
Using Regular Expressions with VBA Andrew Hall NZ Excel Programming 5 November 21st 06 09:30 PM
Regular Expressions in VBA? Rob[_23_] Excel Programming 13 February 10th 05 05:34 AM


All times are GMT +1. The time now is 06:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"