dpeterson
11 years agoOccasional Contributor
aqString.StrMatches only works with hard-coded strings. Seriously???
The following statement returns a boolean value as stated in the product documentation for aqString.StrMatches:
result = aqString.StrMatches("dog", "The quick brown fox jumps over the lazy dogs");
Value for result is true (as expected).
However:
var pattern = "dog";
var text = "The quick brown fox jumps over the lazy dogs";
result = aqString.StrMatches(pattern, text);
Value for result is an object??????? Specifically (from the locals window):
result (Object)
ListSeparator |
QuoteSymbol "
stAll 3
stLeading 1
stTrailing 2
What did I do wrong? I can't believe that this function is designed only to work with hard-coded strings. That would be useless.
result = aqString.StrMatches("dog", "The quick brown fox jumps over the lazy dogs");
Value for result is true (as expected).
However:
var pattern = "dog";
var text = "The quick brown fox jumps over the lazy dogs";
result = aqString.StrMatches(pattern, text);
Value for result is an object??????? Specifically (from the locals window):
result (Object)
ListSeparator |
QuoteSymbol "
stAll 3
stLeading 1
stTrailing 2
What did I do wrong? I can't believe that this function is designed only to work with hard-coded strings. That would be useless.