@ROUGHLYSIMILAR
— Compares words
in two text strings.
Syntax:
%@ROUGHLYSIMILAR[
string1,
string2]
string1 | the first string to compare |
string2 | the second string to compare |
Both strings are simplified before comparing them:
@STRIPACCENTS
. -
and _
are converted to spaces; all other punctuation is removed. After both strings have been simplified, they are compared. %@ROUGHLYSIMILAR
returns
1
if the two strings match, 0
if they differ.
echo %@roughlysimilar[THIS IS A TEST!,This-is-a-test.]