Question OpenEdge 12.8 Linux and .NET proof of concept

JamesBowen

19+ years progress programming and still learning.
Hi,

Can someone please try testing the code below on OE12.8 on Linux OS to test the new .NET compatiablity.

I want to get a good idea of what will work with pratical examples.
I understand that .NET events or anything GUI related won't work on a Linux distro and that is acceptable with the application I'm currently working on.

Code:
define variable patternAdv as character no-undo.
define variable patternBas as character no-undo.
define variable emailAddress as character no-undo.

emailAddress = "yourname@domain.com".
        
// Some of the regex characters had special meaning to the ABL compiler.
// The expression needed to be encoded using hex.
patternBas = string( hex-decode( "5e5b612d7a412d5a302d392e5f252b2d5d2b405b612d7a412d5a302d392e2d5d2b5c2e5b612d7a412d5a5d7b322c7d24" ) ).
patternAdv = string( hex-decode( "5e283f69295b612d7a302d392123242526272a2b2f3d3f5e5f7b7c7d7e2d5d2b283f3a2e5b612d7a302d392123242526272a2b2f3d3f5e5f7b7c7d7e2d5d2b292a40283f3a5b612d7a302d395d283f3a5b612d7a302d392d5d2a5b612d7a302d395d293f5c2e292b5b612d7a5d7b322c7d24" ) ).
        
message System.Text.RegularExpressions.Regex:IsMatch(emailAddress, patternBas).
message System.Text.RegularExpressions.Regex:IsMatch(emailAddress, patternAdv).
 
I cannot comment on the compatibility, but your hex encoded strings did intrigue me. You only need to escape tilde (~), opening curly brace ({) and backslash (\) to keep it legible:

Code:
patternBas = string( hex-decode( "5e5b612d7a412d5a302d392e5f252b2d5d2b405b612d7a412d5a302d392e2d5d2b5c2e5b612d7a412d5a5d7b322c7d24" ) ).
patternAdv = string( hex-decode( "5e283f69295b612d7a302d392123242526272a2b2f3d3f5e5f7b7c7d7e2d5d2b283f3a2e5b612d7a302d392123242526272a2b2f3d3f5e5f7b7c7d7e2d5d2b292a40283f3a5b612d7a302d395d283f3a5b612d7a302d392d5d2a5b612d7a302d395d293f5c2e292b5b612d7a5d7b322c7d24" ) ).

message patternBas = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+~\.[a-zA-Z]~{2,}$".
message patternAdv = "^(?i)[a-z0-9!#$%&'*+/=?^_~{|}~~-]+(?:.[a-z0-9!#$%&'*+/=?^_~{|}~~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?~\.)+[a-z]~{2,}$"

 
I cannot comment on the compatibility, but your hex encoded strings did intrigue me. You only need to escape tilde (~), opening curly brace ({) and backslash (\) to keep it legible:

Code:
patternBas = string( hex-decode( "5e5b612d7a412d5a302d392e5f252b2d5d2b405b612d7a412d5a302d392e2d5d2b5c2e5b612d7a412d5a5d7b322c7d24" ) ).
patternAdv = string( hex-decode( "5e283f69295b612d7a302d392123242526272a2b2f3d3f5e5f7b7c7d7e2d5d2b283f3a2e5b612d7a302d392123242526272a2b2f3d3f5e5f7b7c7d7e2d5d2b292a40283f3a5b612d7a302d395d283f3a5b612d7a302d392d5d2a5b612d7a302d395d293f5c2e292b5b612d7a5d7b322c7d24" ) ).

message patternBas = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+~\.[a-zA-Z]~{2,}$".
message patternAdv = "^(?i)[a-z0-9!#$%&'*+/=?^_~{|}~~-]+(?:.[a-z0-9!#$%&'*+/=?^_~{|}~~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?~\.)+[a-z]~{2,}$"

Hummmm, i was testing on 11.7 and I did originally escape the special characters, but the Progress Developer Studio was having issues.

UPDATE: I was missing the escaping of the (\) backslash.
 
Last edited:
Say that again?? Are you saying that they are stopping the ABLDoJo on Linux on 12.8?
No, 12.8 is not yet supported on the Linux platform that ABLDojo is running on. As per that doc a bunch of Linux flavours were added to the 12.8 supported list per May 1st, but I think ABLDojo was running on Ubuntu.
 
Back
Top