-
-
Save Nanod10/6476434b63410e5dc8d6302f76d1b2b7 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