Skip to content

Instantly share code, notes, and snippets.

@gsherman
Created November 7, 2013 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsherman/7356646 to your computer and use it in GitHub Desktop.
Save gsherman/7356646 to your computer and use it in GitHub Desktop.
example of using regular expressions in ClearBasic
Sub main()
Dim txt as String
Dim newTxt as String
Dim regex As Object
txt="Clarify is cool"
Set regex=CreateObject("vbscript.regexp")
regex.Pattern="Clarify"
newTxt = regex.Replace(txt,"Dovetail")
regex.Pattern="$"
newTxt = regex.Replace(newTxt,"er")
Debug.Print txt
Debug.Print newTxt
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment