topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 10:23 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: don't return aliases unless regexp matches exactly  (Read 3531 times)

ohkine

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
don't return aliases unless regexp matches exactly
« on: February 20, 2010, 08:48 AM »
Another (hopefully easy) question. :)

Is there any way to make FARR not return aliases unless the regexp pattern matches exactly?

For example, say i have a Wikipedia search alias with this pattern: ^wiki (.+)

My expectation was that this alias would not be returned, at all, unless that EXACT regexp was matched (e.g., the text 'wiki', followed by a space, followed by at least one more character). However, that is not what's happening. Instead, FARR returns the alias itself as if it were an item in the file system. So for example if i search for the string wik, with no space or anything else after it, i get an entry that says 'Wikipedia search ($$1 — look up in Wikipedia)'.

Is there any way to turn this off? I don't want to see it unless it matches the regexp exactly.

cheers

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: don't return aliases unless regexp matches exactly
« Reply #1 on: February 20, 2010, 09:01 AM »
regex aliases wont return matches unless they match exactly..
the only exception to this is if there is a partial match to the NAME of the alias.. this can be exploited to give you hints;
to turn it off, just delete the alias name (or make it something like "__myname").

i know that's not the most obvious solution, just emerged as the evolution of alias groups.. i'll see if i cant improve this in the future.

ohkine

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: don't return aliases unless regexp matches exactly
« Reply #2 on: February 20, 2010, 09:05 AM »
Ohh, i get it. Putting underscores in front of the name seems to have done it, i can live with that. Thanks again!