Support for regular expressions (regex) in search

Sure would be nice if the Search in Bear support regex…

1 Like

Hello!

I wrote most of Bear’s search engine and I personally always look for ways to expand what search can do. However, to me regexes seem to be an overkill for Bear, do you mind sharing what do you plan to use them for (use case scenario)?

Thanks

Hi back!

Importantly, I posted my comment about regex before I found the Bear FAQ showing search options.
I suppose if it was a royal pain to add this functionality it is more trouble than it is worth, given the existing search functionality — but it sure would be nice, as regex would allow for so much more. See the list [that was fun to write] below.

  • every occurrence of the phone number 103-555-1212 regardless of how it is formatted
  • a name regardless whether it’s spelled kierkeged, keirkeged, kierkegad, or keirkegad
  • the name “Adam” but only when it’s on the same line with “Eve”
  • all occurrences of the word “Balance” on the same line with a negative number greater than two digits
  • all places where “Balance” occurs with a number longer than 5 digits that might or might not contain a comma
  • all places where “Birth year” occurs next to a number in the range 1950 to 1980
  • all places where “Birthday” occurs next to “Feb 6,” “February 6,” or “2/6”
  • all occurrences of iso codes for US languges like US-CA, US-UK, etc. next to the word “no”
  • all domain names starting with “ftp.” and ending with “.uk”
  • all domain names that do not have a subdomain
  • all words in a list where the word contains non-latin characters
  • all words in a list where the word is spelled only using certain letters in any order
  • all occurrences of “Perry Mason sXeY” where X is 3, 4, or 5
1 Like