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!


In reply to PerlMonks Search Regex by mt2k

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.