A help with regular expressions in Delphi 10 please. I need to check the following in string
:
Examples
VALID STRINGS :
AaaaaaaaBCCcc654_qq
1111s123AaBCcc654_qq
____ds4___xx
12345_123
INVALID STRINGS :
12345-123 (tem hífen)
asdkdn 092834sdfdf (tem espaco em branco)
$123.0 (tem "$" e ".")
I tried things like these, but they did not work:
var ret: TMatch;
begin
ret := TRegEx.Match(Edit1.Text, '([a-z]*[A-Z]*[0-9]*[-]?)', [roIgnoreCase]);
or
ret := TRegEx.Match(Edit1.Text, '(\w*)', [roIgnoreCase]);