Page Index Toggle Pages: [1] 2 3  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) Non-Working "as is" Search Characters (Read 6006 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Non-Working "as is" Search Characters
Nov 30th, 2005 at 9:46pm
Print Post Print Post  
Mark -

Are you aware that there are certain characters that won't work "as is" in search strings?

Here's two that I have come across recently.

     ampersand  ( & )     ...   forward slash     ( / )

For example, I have a name field with something like:

     John & Jane Smith

Whether I search for John & Jane Smith in either the universal mode or even in the field itself, it does not retrieve the record.

Apparently I must tell Sesame that I want it to search for the "literal" character of an ampersand and I have to enter

     John \& Jane Smith

Likewise, to search for a field with a forward slash / I must first enter the backslash, such as:

     ..\/..     (or ..\/\/..  to search for two forward slashes)

If you are aware of this, my question is whether this is documented in the user guide ... so I know what the "restricted" search characters are.

Whether or not you're aware of this, is there any hope that this can be modified so that I can search for any character without having to use the backslash preceding it? Otherwise, unless I can remember all the "restricted" characters, I have no way of knowing whether my search indeed failed .... or whether I used a character that will not work "as it."

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Non-Working "as is" Search Characters
Reply #1 - Nov 30th, 2005 at 10:00pm
Print Post Print Post  
Hello Spencer,

Yes we are aware of it and Yes it is documented

Page 224, 229, 235 of the Sesame 1.1 User Guide show the special search characters.

I believe both of those characters are carried over from the Q&A search syntax, so it is unlikly that they will be changed.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Non-Working "as is" Search Characters
Reply #2 - Nov 30th, 2005 at 10:13pm
Print Post Print Post  
Spencer,

This doesn't work for all special characters, but there is an undocumented special character that may help. If you precede your search criteria with [ , Search will not treat the following characters as special:

[ ] * . ? ^ " $

So to search for M.. in a field as opposed to all values beginning with M try:

[M..

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Non-Working "as is" Search Characters
Reply #3 - Nov 30th, 2005 at 10:44pm
Print Post Print Post  
Hi -

OK - my first reaction is that we need to quickly convert all Q&A users to Sesame so that we don't have to be bound by Q&A's previous restrictions.  lol  Since that's not likely to happen in the immediate future, it would be very helpful to have concise illustrations of [b][i]all[/i][/b] the special search characters that might be required.  

I checked the references you gave me, Ray, and did not find a complete, comprehensive listing.  I did pick up the equal sign ( = ) as another special character; however I did not see the forward slash ( / ) listed (per se).   So, I am now intrested in hearing from anyone who is aware of any special search needs.

I was trying to come up with at least a partial listing, but it is turning out to be more complicated than I thought.  So ... when I get something worth listing, I will do so and I will modify it whenever I have something new to add.

In the meantime, Erika, I am confused about the left bracket ( [ )character and how I can use it.

For example, supppose that I have a field entry of

Spencer?  Mary

I can find the appropriate record (and no others)  by searching using ..\?..

but I am not able to find the record using  ..[?..

Am I misunderstanding what you meant by saying that the [ works with ?       ??????

Guess I know what I'll be "playing" with into the wee hours of the morning (yet again). lol





  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Non-Working "as is" Search Characters
Reply #4 - Nov 30th, 2005 at 11:05pm
Print Post Print Post  
Just for historical purposes, the "undocumented" illegal character search in Q&A was the ] character

For example entering ]YES into a number field would bring those records with the word YES in the field.

Ironic that the special character in Sesame would be the matching bracket [ Shocked
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Non-Working "as is" Search Characters
Reply #5 - Nov 30th, 2005 at 11:18pm
Print Post Print Post  
The "]" was already taken. It is used to perform a text search in non-text fields. From the manual:
Quote:
] Performs a text search in a non-text field. The ] must be the first character of the criteria. There are limited opportunities to use this special search character because Sesame's strict data typing prohibits the entry of invalid information in number and date fields, for example. The primary use of ] is to perform wildcard searches in date fields. This is possible because the underlying value stored in the date field —regardless of format — is stored in YYYY/MM/DD (2003/12/15, for example) format. By beginning the search criteria with ] you can use Sesame's regular wildcard characters.


That "[" causes most of the special characters to be "escaped" - as though you had put a backslash in front of each of them.

That is one of the ironies of DOS. When MS decided to use the backslash as the directory separator, most OSs and most computer languages had standardized that as the "escaping" character. Thereby, MS created one of the biggest incompatibilities in computer history.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Non-Working "as is" Search Characters
Reply #6 - Nov 30th, 2005 at 11:26pm
Print Post Print Post  
OK (mostly Erika) here's something else I am confused about.

You said that [ could be used to search for [ ] (among the others).

Yet, if I have a record such as

Spencer or [Mary]

I can search for the record using ..[.. or ..]..
(Likewise I cannot retrieve the record using ..[[.. or ..[]..)  I am not getting any extraneous records.  Is there a case when using either of these two examples would bring up records that I do not want included?

I have had no success searching for a record containing two dots. 

Spencer..Mary
Thomas .. Bill

Without know the names, how do I find these two records by searching for the ..
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Non-Working "as is" Search Characters
Reply #7 - Nov 30th, 2005 at 11:44pm
Print Post Print Post  
Spencer,

Erika is getting ready for another road trip teaching classes in Toronto and Dallas - so you are stuck with me.

The "[" character disables most of the special characters that follow it till the end of the line. So, if you say:
Code
Select All
[M.. 


It will only match a LE that has an M followed by two periods in it (and nothing else!). In other words, it is looking for a LE with "M.." in it exactly.

In the example, you have given "Spencer..Mary" as being in the LE. To find that without knowing the names, use "..\.\..."

The backsplash only escapes one set of the search characters. The "[" escapes all of the search characters (Erika listed) until the end of the line.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Non-Working "as is" Search Characters
Reply #8 - Dec 1st, 2005 at 12:23am
Print Post Print Post  
Just to help clarify ..\.\...

This is the same as the "normal" two-dot wild card.
like using ..ABC..  to locate ABC, you are trying to locate two periods.

.. for the leading two dots.
\. for the first period to look for
\. for the second period to look for
.. for the trailing two dots.

The \ only provides special handling for the single following character.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Non-Working "as is" Search Characters
Reply #9 - Dec 1st, 2005 at 12:51am
Print Post Print Post  
Grrr

With regard to the .. search, I am more confused than ever before.

I could swear that I tried the retrieve spec you suggested, Mark, for retrieving two dots and that it retrieved more records than just the one containing two dots.  In any event, I just tried it again and it appears to work correctly. 

Mark - I only mentioned Erika because she is the one who posted the use of [ - to indicate that the following character should be treated as literal - in a retrieve spec; I could not, however, get it to function that way.  So, once again, if anyone can given an example of using it, I would be happy to try it.



  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Non-Working "as is" Search Characters
Reply #10 - Dec 1st, 2005 at 1:18am
Print Post Print Post  
The "[" does not just escape the "special" characters immediately following it, but all the special characters (within the set that Erika posted) following it until the end of the line.

A case where you might want to use this is if you want to use cut&paste to fill in a search spec from LE values, but you know that some or all of the source LEs may contain "special" characters and you want an exact match. By, placing a "[" at the start of the line, you tell Sesame to ignore all of the special characters that may appear in the following string.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Non-Working "as is" Search Characters
Reply #11 - Dec 1st, 2005 at 1:20am
Print Post Print Post  
Now I am even confusing myself.

Marc -  I [b]know[/b] that recently I had tried searching for // and it would not work unless I typed ..\/\/..

YET, I just tried it using ..//.. and it worked just fine.  Is it possible you "fixed" (or changed) something in the most recent release of verion 1.1.3 ?  
« Last Edit: Dec 1st, 2005 at 4:12pm by SpencerWulwick »  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Non-Working "as is" Search Characters
Reply #12 - Dec 1st, 2005 at 1:37am
Print Post Print Post  
Are you aware that certain of the search command characters in Sesame (and in Q&A) are specific to certain field / LE types? So, what you may need to escape in one LE, you may not need to escape in an LE of a different type.

It was actually one of the things that I objected to most in reimplementing the "Q&A" way of searching. For example, the ".." operates as the "match any number of any character" when used in a string field, but means "range" or "through" when used in a date field. This inconsistency means that users must not only memorize a "mini-language" in order to search, but must also remember a set of "modes" (based on field type) that modify the meaning of the language.

Sesame 2.0 remedies this to an extent in that it optionally supports regular expressions in place of Q&A search syntax. And while, regex is also a mini-language that must be memorized, it is not mode-centric.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Non-Working "as is" Search Characters
Reply #13 - Dec 1st, 2005 at 3:16am
Print Post Print Post  
Hi -

Let me see if I can clarify my comments because I would like to hear very specific examples that could be of general value to myself and others.

First, I should have clarified that my searches at this point have been within a text LED, so please keep in mind that my specific illustrations are in regard to doing a search on a text LED field.  Also, I have not seen any difference in behavior (other than that expected) of performing the search in a specific field or using the universal search mode to perform the search on any or all fields.

1)  No matter what situations I try to set up, I cannot get the [ character to work.  I would really appreciate knowing something I could type into a text field and then retireve it using the [ and not simply using     ..something..  I would like an example of something I can specifically type into a text field ... and what I would need to specifically type into the retrieve spec ... to achieve the desired result.

Specifically here is what I found will not work when using a typical wildcard search unless you bring into play the \ character.

2)  If I want to find \ within a field
  • \ retrieves nothing
  • ..\.. retrieves nothing
  • ..\\.. produces the desired result


3)  If I want to find = within a field
  • = retrieves all blank records (as expected)
  • ..=.. retrieves nothing
  • ..\=.. produces the desired result


4)  If I want to find & within a field
  • & retrieves nothing
  • ..&.. retrieves all records
  • ..\&.. produces the desired result


5)  If I want to find . within a field
  • . retrieves nothing
  • ..... retrieves records with ending . (as does ..\.)
  • ..\... produces the desired result


6)  If I want to find ? within a field
  • ? retrieves records with field containing one character (as expected)
  • ..?.. retrieves records with non-blank field (as expected and as will /=)
  • ..\?.. produces the desired result


7)  If I want to find .. within a field
  • .. retrieves all records including blanks
  • ...... retrieves all records including blanks
  • ..\.\... produces the desired result

So, at this point, I am basically asking for three things:

1)  A precise example of how I can set up a situation where [ would be used in the retrieve spec (as discussed in point 1 above)

2)  Additional examples, such as I gave (in points 2 through 7 above) of a character you could not find within a field, using a simple wildcard search and

3)  How (in the case of 2 immediately above) you would perform the search to get the desired results.

I've tried my darndest to make both my request, and the information I am sharing, as clear as possible and hope this will enable some feedback that is directly "on point" (along with the other "stuff" that has been very informative and helpful).

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Non-Working "as is" Search Characters
Reply #14 - Dec 1st, 2005 at 2:29pm
Print Post Print Post  
Quote:
Hi -

Let me see if I can clarify my comments because I would like to hear very specific examples that could be of general value to myself and others.

First, I should have clarified that my searches at this point have been within a text LED, so please keep in mind that my specific illustrations are in regard to doing a search on a text LED field.  Also, I have not seen any difference in behavior (other than that expected) of performing the search in a specific field or using the universal search mode to perform the search on any or all fields.

1)  No matter what situations I try to set up, I cannot get the [ character to work.  I would really appreciate knowing something I could type into a text field and then retireve it using the [ and not simply using     ..something..  I would like an example of something I can specifically type into a text field ... and what I would need to specifically type into the retrieve spec ... to achieve the desired result.

Specifically here is what I found will not work when using a typical wildcard search unless you bring into play the \ character.

2)  If I want to find \ within a field
  • \ retrieves nothing
  • ..\.. retrieves nothing
  • ..\\.. produces the desired result



Yes. That is correct, and is correct behavior. The backslash means "escape the following" and must be escaped to be used literally.

Quote:
3)  If I want to find = within a field
  • = retrieves all blank records (as expected)
  • ..=.. retrieves nothing
  • ..\=.. produces the desired result



Yes. That is correct and correct behavior. The equal sign means "equals" and must be escaped to be used literally.

Quote:
4)  If I want to find & within a field
  • & retrieves nothing
  • ..&.. retrieves all records
  • ..\&.. produces the desired result



Yes. That is correct and correct behavior. The ampersand means "and" and must be escaped to be used literally.

Quote:
5)  If I want to find . within a field
  • . retrieves nothing
  • ..... retrieves records with ending . (as does ..\.)
  • ..\... produces the desired result



No. That is incorrect. A single period has no meaning to Sesame and does not need to be escaped - though a double period does.

So, if you have a field that says: "Mary.Lister" and you create a search spec for that field that says "Mary.Lister", Sesame will find the record that has that field saying "Mary.Lister" without anything being backslashed or escaped.

Quote:
6)  If I want to find ? within a field
  • ? retrieves records with field containing one character (as expected)
  • ..?.. retrieves records with non-blank field (as expected and as will /=)
  • ..\?.. produces the desired result



Yes. That is correct in part, and correct behavior. The question mark means match any single character and must be escaped to match only a literal question mark.

Quote:
7)  If I want to find .. within a field
  • .. retrieves all records including blanks
  • ...... retrieves all records including blanks
  • ..\.\... produces the desired result



Yes. This is correct in part, and correct behavior. a double period ("..") in a string field, represents any number of any character, and must be escaped to be used literally. Though only one backslash is necessary to escape both periods, i.e.: "\.."

Quote:
So, at this point, I am basically asking for three things:

1)  A precise example of how I can set up a situation where [ would be used in the retrieve spec (as discussed in point 1 above)


If your field contains: "Mary..A..Lister..Billingsham..Wadsworth" and you seek to find (specifically) "Mary A. Lister Billingsham Wadsworth" and no on else. You could either enter "Mary\..A\..Lister\..Billingsham\..Wadsworth" in your search spec, or you could enter: "[Mary..A..Lister..Billingsham..Wadsworth" in your search spec. They would both resolve to the same thing.

Quote:
2)  Additional examples, such as I gave (in points 2 through 7 above) of a character you could not find within a field, using a simple wildcard search and


In a string field, the following characters and sequences of characters need to be escaped to be found literally:
Code
Select All
..
(
)
>
<
=
>=
<=
[]
{
}
~
&
;
/
MAX
MIN
?
\
 



Quote:
3)  How (in the case of 2 immediately above) you would perform the search to get the desired results.


In every case you can either preceed the command sequence with a backslash, or you can preceed the entire search spec string with a "[". If you preceed the string with a "[", you will literalize most of the command sequences in that string.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send Topic Send Topic Print Print