Skip to content

Instantly share code, notes, and snippets.


Leonardo Jauregui Nanod10

View GitHub Profile
Nanod10 / regex.prg
Created May 8, 2019 — forked from krlicmuhamed/regex.prg
Using regex in FoxPro
View regex.prg
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
Nanod10 / httpmessagebuilder.prg
Created May 8, 2019 — forked from krlicmuhamed/httpmessagebuilder.prg
Build HTTP Request Messages using Visual FoxPro
View httpmessagebuilder.prg
*Example Usage:
Builder = CREATEOBJECT('HttpMessageBuilder')
*Builder.UserAgent = 'BK5'
Builder.AddHeader('TestHeader', 'test123 456')
Builder.AddHeader('TestHeader', 'test123 456')
Builder.AddParameter('TestParameter', 'Thisisat estparameter')
Builder.AddParameter('TestParameter', 'Thisisatestparam eter')
* You also get a free URLEncode function :)
Builder.URLEncode('str in g <3')
You can’t perform that action at this time.