Using Replace with numeric wildcards

Using Replace with numeric wildcards

b.tuckerB6DT3
Explorer Explorer
223 Views
1 Reply
Message 1 of 2

Using Replace with numeric wildcards

b.tuckerB6DT3
Explorer
Explorer

I am writing a function that will parse through all my sheets and replace the sheet name from:
Assembly:1

Details:2

 

to

Sheet 1 - Assembly:1

Sheet 2 - Details:2

 

I am having troubles using the replace command to ignore the ":1" at the end of the original title to be able to replace it. Can anyone give me some insight on how to use RegEx modifiers to select any number?

 

 

Dim oDoc As Document 
Dim dwgDoc As DrawingDocument = ThisDoc.Document
i = 1
For Each dwgSheet As Sheet In dwgDoc.Sheets
	vTest = dwgSheet.Name.Replace(":", "")
	vTest = vTest.Replace("#", "")
	If i = 1
		MsgBox(vTest)
	end if 
	'dwgSheet.Name = "Sheet " & i & " - " & vTest
	i = i + 1
Next

 

0 Likes
Accepted solutions (1)
224 Views
1 Reply
Reply (1)
Message 2 of 2

lmc.engineering
Advocate
Advocate
Accepted solution
vTest = dwgSheet.Name.split(":")(0)
0 Likes