Last active
March 19, 2021 19:12
-
-
Save krlicmuhamed/9459d7b84011e29e2aef85e1a2951372 to your computer and use it in GitHub Desktop.
Using regex in FoxPro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oRE = CreateObject("VBScript.RegExp") | |
oRE.Pattern = "regular expression here" | |
lcString = "string to search" | |
llResult = oRE.test(lcString) | |
lcMatches = oRE.Execute(lcString) | |
IF ALEN(lcMatches) > 0 | |
llResult = lcMatches(0).Submatches(0) && First match and first submatch/group | |
ENDIF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment