Gossamer Forum
Home : Products : DBMan : Customization :

What is "Regular Expression"

Quote Reply
What is "Regular Expression"
What does Regular Expression checkbox in search parameters mean?
Quote Reply
Re: What is "Regular Expression" In reply to
A "Regular Expression" is a strange critter found only in the deepest wilds of Perldom. Smile

(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





Quote Reply
Re: What is "Regular Expression" In reply to
Thanks, it's a very useful feature.