What does Regular Expression checkbox in search parameters mean?
Jun 25, 1999, 8:03 AM
Veteran / Moderator (8669 posts)
Jun 25, 1999, 8:03 AM
Post #2 of 3
Views: 1809
A "Regular Expression" is a strange critter found only in the deepest wilds of Perldom.
(Sorry. I'll get serious now.)
This is not an easy thing to explain, at least for me, but I'll give it a try.
There are expressions you can use within Perl to do pattern-matching. They can give users more control over the search by allowing them to narrow things down a bit.
Regular expressions can become quite complicated, but here are a few that you might think about using.
If you place a ^ at the beginning of your search term, DBMan will only find records where the value of the field begins with your search term. For example,
^hal
will find Hall and Halloran, but not Chalmers.
If you place a $ at the end of your search term, DBMan will only find records where the field value ends with your search term.
man$
will find Feldman or Man but not Schumann or Mannix.
The other thing you can use regular expressions for is to do "or" searches. For this you use the | character between the search terms.
hall|hoyt
will find Hall, O'Halloran, Hoyt, or Wilhoyt.
You could mix them, so that
^hal|man$
would find Hall, Halloran, Feldman or Man, but not O'Halloran or Mannix.
With all of these, you need to have the "Regular Expression" checkbox selected, or it will look for the actual characters in the field and you'll probably come up with nothing.
Does that help?
------------------
JPD
(Sorry. I'll get serious now.)
This is not an easy thing to explain, at least for me, but I'll give it a try.
There are expressions you can use within Perl to do pattern-matching. They can give users more control over the search by allowing them to narrow things down a bit.
Regular expressions can become quite complicated, but here are a few that you might think about using.
If you place a ^ at the beginning of your search term, DBMan will only find records where the value of the field begins with your search term. For example,
^hal
will find Hall and Halloran, but not Chalmers.
If you place a $ at the end of your search term, DBMan will only find records where the field value ends with your search term.
man$
will find Feldman or Man but not Schumann or Mannix.
The other thing you can use regular expressions for is to do "or" searches. For this you use the | character between the search terms.
hall|hoyt
will find Hall, O'Halloran, Hoyt, or Wilhoyt.
You could mix them, so that
^hal|man$
would find Hall, Halloran, Feldman or Man, but not O'Halloran or Mannix.
With all of these, you need to have the "Regular Expression" checkbox selected, or it will look for the actual characters in the field and you'll probably come up with nothing.
Does that help?
------------------
JPD