Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regular Expression
Message
From
23/11/2013 13:34:59
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brazil
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Regular Expression
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01588553
Message ID:
01588553
Views:
112
Hi folks.
I'm using the following regular expression to validate some strings:

[0-9]+; [0-9]+ [0-9]+ SCHEMA - \b(information-schema|(?!pg_))\w+\b [a-zA-Z]+

8; 2615 1490850 SCHEMA - e9999 postgres
8; 2615 1490850 SCHEMA - pg_catalog postgres
8; 2615 1490850 SCHEMA - pg_temp postgres
8; 2615 1490850 SCHEMA - information-schema postgres
8; 2615 1490850 SCHEMA - information-test postgres
8; 2615 1490850 SCHEMA - information postgres
8; 2615 1490850 SCHEMA - schema postgres
8; 2615 1490850 SCHEMA - myinformation-schema postgres
8; 2615 1490850 SCHEMA - information-schemas postgres

Test string - Expected result - Given result
String 1 - Valid - Valid
String 2 - Invalid - Invalid
String 3 - Invalid - Invalid
String 4 - Invalid - Invalid
String 5 - Valid - Invalid (Error)
String 6 - Valid - Valid
String 7 - Valid - Valid
String 8 - Valid - Invalid (Error)
String 9 - Valid - Valid

Please, someone could help me to find the right pattern?
Emerson Santon Reed
"One Developer CAN Make a Difference. A community CAN make a future." - Craig Boyd
Next
Reply
Map
View

Click here to load this message in the networking platform