This content has been marked as final. Show 3 replies
'You can do this in VBScript...
Set re = New RegExp
.Pattern = "[A-Z]"
.Global = True
.IgnoreCase = False
targetString = "A"
'8 lines more than you'd like.
I couldn't find "RegExp" in the InDesign script model--could you give a bit more information about what this is? I don't know how to iterate through the contents of an XMLElement as individual character objects, so I'm iterating throught XML.contents, putting each character in a basic string variable. I need a way to put strings into a With statement, or a Like operator. I haven't had success with either technique.
Here's an example:
strTime = myCurrentXMLElement.contents
strTime = Trim(strTime)
strLength = Len(strTime)
For counter = 1 to strLength
strTemp = Mid(strTime, counter, 1)
[This is where I need to find out if strTemp is a letter or a digit]
RegExp is not part of the Indesign Script Model but a Visual Basic class that handles regular expressions, equivalent of System.Text.RegularExpressions.Regex(pattern, regex_options) in VB.Net.