Couldnt test this as the keyword doesnt exist but if thew syntax is correct should work. is it regexpr$ or regexpr
[code=thinbasic]
' Usage of the REGEXPR$ Keyword example
'
' Syntax - s = REGEXPR$(sMask, sMain, nStart, nVarPos, nVarLen)
' Written by Abraxas
DIM sMask as string value "LO"
DIM sMain as string value "HELLO WORLD"
DIM nStart as DWORD Value 0
DIM nVarPos as dword value 0
DIM nVarLen as DWOrD value 0
DIM s as string
DIM sMsg as string
s = REGEXPR$(sMask, sMain, nStart, nVarPos, nVarLen)
sMsg += "String Mask = " & sMask & $CRLF
sMsg += "String = " & sMain & $CRLF
sMsg += "String Start Position = " & nStart & $CRLF
sMsg += "Match Start Position = " & nVarPos & $CRLF
sMsg += "String Length = " & nVarlen & $CRLF
sMsg += "String Returned = " & s & $CRLF
MsgBox 0, sMsg
[/code]
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Abraxas,
we had some licence problems with Power Basic Inc. (the company producing the compiler we use to develop thinBasic) regarding using regular expression parser functions present in the compiler. For this reason we removed REGEXPR$ function. Not sure if we will be able to use it but we are searching for a free alternative.
Thanks in any way.
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Bookmarks