Consultor Eletrônico



Kbase P15152: Why Doesn't MATCHES Find Values Containing a Period or an As
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/11/2003
Status: Unverified

FACT(s) (Environment):

Windows

FACT(s) (Environment):

Progress/WebSpeed Versions

SYMPTOM(s):

The following code, the result will include everything.

for each person where person.last_name matches "*..*":U:

display person.last_name.

end.

The result is the same as:

for each person where person.last_name matches "*":U:

display person.last_name.

end.

CAUSE:

If you want to specify a period ( . ) or an asterisk (a constant, field name, variable name, or expression whose value is character)( * ) as a literal character rather than a wildcard character in the pattern, enter a tilde (~) before the character.

For example, the result of "*a.b" MATCHES "~*a.~.b" is TRUE.
If you specify the match pattern as a literal quoted string in a procedure file, enter each tilde as a double tilde ( ~ ~ ) so that they are interpreted as tildes for the match pattern.

FIX:

for each person where person.last_name matches "*~~.*":U:

display person.last_name.

end.