> Anyway, searching the database seems to turn up many false positives.  I
> am quite familiar with regular expressions from Perl hacking and
> grepping, so I'm pretty sure I'm not making a mistake.  Using
> bbdb-search-name (or bbdb or b in the BBDB buffer) returns the correct
> match and at least one false positive, every time.  For example,
> searching for Jo* returns (minus the domain names, which are either
> otago dot ac dot nz or gmail dot com):

> -----------------------------------------------------
> Jeremiah Deng
>                mail: jeremiah.deng@

> Jenny Rock
>                mail: jennifer.rock@

> John Williams
>                mail: john.williams@, johnfrombluff@
> ----------------------------------------------------

Those are not false positives.  You want to search for Jo followed by whatever, 
but you are actually searching for J followed by zero or more o's so everything 
with a J matches.

>From the Emacs manual (C-h i) on regular expressions (M regex):

3.4.1 The Match-zero-or-more Operator ('*')
-------------------------------------------

This operator repeats the smallest possible preceding regular expression
as many times as necessary (including zero) to match the pattern.  '*'
represents this operator.  For example, 'o*' matches any string made up
of zero or more 'o's.  Since this operator operates on the smallest
preceding regular expression, 'fo*' has a repeating 'o', not a repeating
'fo'.  So, 'fo*' matches 'f', 'fo', 'foo', and so on.


-- 
Dave Goldberg
david.goldbe...@verizon.net

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to