LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Regex techniques

I am still struggling with the use of the RegExp object in the VBScript_55
library, in Excel/VBA.

In my "old" regex processor, BKReplacem, I could use special characters such
as \n in the REPLACEMENT string, not just the search string. But that does
not seem to work in VBScript... I would get the literal "\n" in the output,
for example.

Perhaps I am trying to do things beyond this flavor of regex's capabilities.
I am trying to substantially reform and add information to multiple HTML
docs, using a set of search and replace rules stored in a spreadsheet for
ease of maintenance.

I note that I have never seen a VBS-regex example involving multiple lines
of text, but isn't that why they have the multi-line and global options?

Does anyone know of a source of VBS-regex documentation or examples that are
more oriented to text files, as opposed to field-validation applications?

I should mention that I am reading my text files in from a text stream
object into a single string variable, so that I can process the entire scope
of the document - line by line will not suffice for what I need to do.

To recap my questions:
1. Can I use special regex characters in the VBS replace string?
2. Can I process entire multi-line documents, and if so is the one-string
approach the right one in VBS?
3. Is there a source of documentation on more substantial multi-line VBS
regexs?

Thanks!
 
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
Relational Techniques... there's got to be a better way Mike[_10_] New Users to Excel 0 November 4th 08 06:02 PM
Addressing Techniques virendra Excel Discussion (Misc queries) 2 December 27th 06 07:35 AM
Box-Jenkins techniques & Time Series karim Excel Worksheet Functions 3 October 2nd 05 10:28 PM
RegEx to parse something like this... R Avery Excel Programming 2 March 7th 05 06:41 PM
Regex Question William Barnes Excel Programming 5 January 2nd 04 11:57 AM


All times are GMT +1. The time now is 04:09 AM.

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"