PxPlus User Forum
Main Board => Discussions => Language => Topic started by: Peter.Higgins on April 14, 2020, 07:32:46 PM
-
We have been using the web/ftp with the regex option in an INVOKE command.
With simple *.extn and *.* it works.
There is now a need for using more complex regex and I am not having success returning files.
Version is 14.00 PxPlus.
For instance, in web/ftp
*.gfs|B0M works as a mask in web/ftp but not in PxPlus
^g[0-9]{6}c313260[0-9]*\.gfs|B0M does not work as a mask in web/ftp but works great in PxPlus.
I have tried putting the -'OM'=0 in the invoke statement which has no affect.
Can anyone explain how this works in web/ftp?
Example with an actual file name.
0001 msk$="^g[0-9]{6}c313260[0-9]*\.gfs" ! "|(^g[0-9]+c313260[0-9]*\.gfs)"
0002 x$="g200410c31326001000000000322285095.gfs"
0003 PRINT MSK(x$,msk$)
0004 PRINT MSL
-;run
1
38
-;
-
PxPlus 2014 does not support the M option (MSK( ) regular expression pattern matching) in *web/ftp. That ability was added in PxPlus 2016 update 0001.
-
Thanks Devon,
Shades of Manifest. I seem to have lost 3 years. :o
Are we discussing this year's Direxions version for implementing the msk?
PxPlus-2019 Web (Ver:16.10/MS-WINDOWS) Serno:1610-001-
(c) Copyright 2005-2018 PVX Plus Technologies Ltd. (All rights reserved)
Website: http://www.pvxplus.com
->?ssn
1610-001-
->
-
*web/ftp was enhanced to support full regular expressions using the M option starting with PxPlus 2016 update 0001. All versions released after that also had this enhanced version of *web/ftp.
PxPlus 2019 is newer then PxPlus 2016 so it will have the version of *web/ftp that supports regular expressions via the M option.
-
Devon,
This is the version in use. Should it support MSK in web/ftp?
PxPlus-2017 Pro (Ver:14.00/UNIX-Linux-RedHat) Serno:1400-664-
(c) Copyright 2005-2017 PVX Plus Technologies Ltd. (All rights reserved)
Website: http://www.pvxplus.com
->
-
Yes PxPlus 2017 should support *web/ftp regular expression via the M option.
Sorry when you said originally you were using version 14 my brain interpreted that as PxPlus 2014.
-
Devon,
Understandable. What if anything can I do to debug this. This program is encrypted.
Do you know if the msk is applied in Curl or in the program itself?
-
The MSK() happens in the PxPlus program.
I think your problem may be that you include ^ at the start of your pattern. The pattern as passed into *web/ftp is automatically put between a ^ and a $ to ensure only whole matches return true.
If you remove the ^ from your pattern it should work.
-
Thanks Devon,
You are right. Works great without the ^$
I'll sub those out in the Filter setup field validation and we are good to go.
Have a terrific day.