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
|