is there a way to use regular expressions in corel designer x5, something like this?
[(](0)?([0-7])
if it starts with a open bracket and the number is one of these 1 to 7 Or 01 to 07
how would I search for text like that? thank you!
I do not recall when Regular Expressions were added for CorelDESIGNER, so to test if it works in X5 open the Immediate window and type:
?Evaluate("'(123)'.RegContains('[(](0)?([0-7])')")
If they are supported then you should get a True returned. You can then use that to write something like this, which will select the text is finds on the active layer which matches your pattern.
Sub RegExContainsExample() Dim srText As ShapeRange, srContains As ShapeRange Set srText = ActiveLayer.Shapes.FindShapes(Type:=cdrTextShape) Set srContains = srText.Shapes.FindShapes(Query:="@com.text.story.text.RegContains('[(](0)?([0-7])')") srContains.CreateSelection ActiveWindow.Refresh End Sub
Hope that helps,
-Shelby