Page 1 of 1

Search strings with imbedd special characters

PostPosted: Thu Aug 23, 2007 11:45 am
by gn194586
Hello,
I guess I'm "regular expression - challenged" like many others in this forum.
I'm trying to understand how to search on an expression that contains imbedded
special characters and can't seem to get it. Any help (especially examples)
would be greatly appreciated. Following are the attempts I made and the results-

Searching for (xx1)
search string result
------------- ------
(xx1) - finds (xx1), but also (xx24), (xx60), etc.
"(xx1)" - gives - No results found for query "\\\"(xx1)\\\""
\(xx1\) - finds (xx1), but also (xx24), (xx60), etc.
\Q(xx1)E\ - finds (xx1), but also (xx24), (xx60), etc.

Searching for St. John
search string result
------------- ------
St. John - finds St. John, but also every other John
"St. John" - gives No results found for query "\\\"St. John\\\""
St\.\ John - finds everything with a blank in it? (many hits without ST. or John)
\QSt. JohnE\ - finds everything with a blank in it? (many hits without ST. or John)

PostPosted: Thu Aug 23, 2007 1:13 pm
by Quade
If I was searching for "St. John".

I'd enter it as "St[.] John" (without the quotes) or "St\. John"

There's no reason to escape the space.

"\(xx1\) - finds (xx1), but also (xx24), (xx60), etc."

Should work.

If you PM me a specific group and subject, I can try it. Don't post it out here in the open.

PostPosted: Thu Jul 10, 2008 10:25 am
by bobkoure
Or maybe
St[.]?[ ]?John
Which would match "St.John", "St. John", "StJohn", and "St John"

The space doesn't need to be in brackets (or escaped) but, if I'm writing a filter, I put spaces in brackets just so I can see 'em if I look at it later (bad memory and not-so-great eyesight so I need all the help I can get...)

PostPosted: Thu Jul 10, 2008 12:39 pm
by Quade
What I said in my post won't be true in the future. You will have to escape the space because any spaces will imply AND and not exact pattern match.

PostPosted: Sat Jul 12, 2008 4:19 pm
by bobkoure
Interesting.
Still OK inside brackets: (i.e. "foo[ ]bar")?
What about if the rest of the expression indicates that it's a regex: (i.e. "^.*foo bar")?

PostPosted: Sat Jul 12, 2008 5:52 pm
by Quade
The items will still be RE compatible but, logical operators between items will also be permitted. This is needed for the new high speed local search.