

Task

   match a string against a regular expression
   substitute part of a string using a regular expression


Public Sub Main() 
Dim sString As String = "Hello world!"
 
If sString Ends "!" Then Print sString & " ends with !"
If sString Begins "Hel" Then Print sString & " begins with 'Hel'"
 
sString = Replace(sString, "world", "moon")
 
Print sString
 
End 