|Perl: the Markov chain saw|
PerlMonks Search Regexby mt2k (Hermit)
|on Jun 08, 2002 at 22:55 UTC||Need Help??|
I did a quick perlmonks search for "search regex" and "perlmonks search" but came up with nothing on this subject. If I missed it somewhere, please post a link where I can read up on it.
My proposition is this: Yes, Super Search is cool, and the general search is usually enough to find what one is looking for, but how hard would it be to incorporate the use of a regex in the search engine?
Imagine how much power we would have in searching for a particular post/question/answer/user or whatever else we are looking for on the site. Pretend you are pepik_knize's friend, but you just can't seem to remember how to spell that whole dang name (pepsi_knife?). Let's say you remember that it starts with "pep". Super Search could almost handle this, but this would first reuire finding the dang thing and then you remember that it can only handle 4 letters or longer.
Wouldn't it be so much more funner/faster/programatic to simply type "/^pep/" in the normal search box. Of course, this is just the simplest of regexes. If you *really* know what you are looking for, you could throw together quite a regex to find the specific post(s) you want, rather than scrolling for forever down the whole list brought up when searching for anything.
I think the main debate here is how much strain would this put on the server to run a customized regex? Would it actually run faster, or would it bog everything down? Then there is always the fact that someone might search for "/.*?/" or something similar, which would be quite a problem.... return every post of pm? Comments please!