Regular Expression Aliases as Search Templates

Top  Previous  Next

New with version 2 is the ability to make an alias that recognizes a regular expression pattern typed by the user, and BEHAVE as if the user had typed in something else (presumably more complicated).  We call these Search Templates.

 

This can be very useful when you have certain search strings that you reuse often.

 

For example, let's say you often do a searches like this :

 

+audio .mp3 Dylan

+audio .mp3 Blondie

+audio .mp3 Bratmobile

 

You can now create an alias which makes this easier.  Just create a new alias, give it any name you want, and choose a regular expression pattern, like

 

^msearch (.*)

 

And now the important part.  for the results, put a single entry as follows:

 

dosearch +audio .mp3 $$1

 

Now when this pattern is matched by the user typing something like:

 

msearch Dylan

 

Then FARR will behave as if the user had typed:

 

+audio .mp3 Dylan