LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Regex as replace function

On Thu, 7 May 2009 07:36:06 -0700, ExcelMonkey
wrote:

The value of StringAddress is:
='\\CGAS114\Username\My Documents\The
Folder\ExcelVBA\[TestFile.xls]Sheet1'!$A$2

The Pattern is:
\[.+\]

The line of code tempstring = objRegExp.Replace(SeriesAddress,
Match(0).Value) shold be returning:

[TestFile.xls]



This really is just a simple extraction.

Given that you want to return the above, using your StringAddress and Pattern,
then replace your "tempstring = ..." line with:

tempstring = Match(0)
--ron
 
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
Help with a regex pattern please [email protected] Excel Programming 3 March 22nd 08 12:14 AM
Help with a Regex Pattern [email protected] Excel Programming 11 April 30th 07 01:49 AM
Regex techniques Dave Runyan Excel Programming 5 April 28th 07 12:17 AM
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 12:17 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"