Search regexp

From AMule Project FAQ
Revision as of 02:52, 17 February 2008 by 213.154.68.135 (Talk)

Jump to: navigation, search

Description

This article explains how to tweak searches and some handy tips and tricks when searching with aMule.

Notice that this tricks may not work for you at some moments, since it depends on the server's running software. However, most ed2k servers run the latest version of lugdunum, so this tricks will work for 99% of your servers.

First notes

Searches always search for all the words in the query and are case-insensitive.

Boolean search

Since aMule 2.1.0 boolean search is supported. This allows fine tweaked searching queries.

The following operators are available:

Operator Meaning
AND Both the query before and after the operator must match
OR Either the query before or after the operator must match
NOT The query after the operator must not match

Instead of AND you can use & and instead of NOT you can use simply ! (not followed by a space).

Example: xfree OR xorg

Example: drivers AND linux

Example: some_free_music AND NOT some_artist is equivalent to some_free_music & !some_artist

So, when you introduce a search query, it is read and each word is understood either as an operator (when it is AND, &, OR, NOT ou !) or as a query.

Example: aMule AND MacOS will search for files containing aMule and MacOS in their filename.

If no operator is found between two words, it defaults to the AND operator.

Notice that operators are case sensitive so, while AND is an operator, and is a word.

Words are any characters between between any of the following characters:

Character Description
, Comma
 ; Semicolon
. Dot
 : Colon
- Dash
_ Underscore
' Apostrophe
/ Slash
 ! Bang
Space

Null words are ignored.

Example: aMule, MacOS is equivalent to aMule,MacOS which is equivalent to aMule AND MacOS.

You can group words and operators in brackets, to make them into a single query with each its sub-queries.

Example: aMule & (MacOS OR Win) will search for al files containing aMule and either MacOS or Win it their filename.

Brackets must always be matched.

Example: aMule AND optionA) will fail since the closing bracket matches no opening bracket.

Example: aMule OR (linux will aslo fail since the opening bracket matches no closing bracket.

Exact matches

Exact matches are an extension of boolean searches.

You may want to search for a series of words together or some other string containing word separators in it. To do so, wrap that string with apostrophes.

Example: aMule and '2.1.0' searches for files containing aMule and 2.1.0 in their filename (notice that the dots are no longer being interpreted as word separators).

Example: aMule'2.1.0' is exactly equivalent as aMule and '2.1.0' , since the apostrophe is still a word separator, so aMule will be one word and 2.1.0 another (and the default operator is AND).

Still, apostrophes will not wrap brackets.

Example: aMule and 'distro (debian)' will fail because the aposotrophes appear to be opened but not closed, since there is a bracket (actually, two of them) in between.

The only way to wrap brackets so that they can be searches as part of a word is wrapping them in double quotes. Double quotes can also wrap apostrophes.

Example: "aMule's 2nd birthday (19-08-2005)"

Example: aMule"2.1.0" is exactly equivalent as aMule and "2.1.0" , since the double quotes are still word separators, so aMule will be one word and 2.1.0 another (and the default operator is AND).

Search for file except for extension ...

You can use the not <query> and !<query> boolean operators in the "extension" field in the search window.

This way you can search for files not containing the given extension, which is often very useful.

Find files similar or related to some other file

In the search box enter related::<hash> where <hash> is the is the hash value of some file. The results you will get will be files which are related or similar to that file.

Actually, what the server does is read an index with all files all clients are sharing and see, out of those sharing the file with has value <hash>, which are the most popular files. Low availability files aren't listed.

Search for hashes or exact file

If you want to search for any file which's has value is <hash>' (where <hash> is any MD4 hash value), you can search for edk2:<hash> and you will get the results.

As an extension, if you want to search for an exact file (maybe you want to see its availability or its rate) and searching it by its hash value gives several non-equal files, you can narrow the results by searching by the file's hash value <hash> and size <size>: ed2k:<size>:<hash>

Or even simply the file's ed2k link (anything after the file's hash in the link will be ignored): ed2k://|file|<name>|<size>|<hash>

The special 'Ñ' character

Current server and client software support unicode so it is no more an issue, but older versions would not support non-english characters, such as the ñ spanish character.

As a solution, the ñ character was aliased to n. So, searching for españa or espana would give the same results.

This aliasing applies also to unicode-supporting clients and servers. The only thing you should notice is that in this case, since ñ is a different character than n and unicoded recognizes it, searching for words containing n will display results containing ñ, but not the other way round.

Notes

You can combine the above tricks, so someone could try to search something like related::<some_hash> AND Video AND SIZE > 1000000

Version

Created by Jacobo221 on 14.12.05 at 03:42
Updated by Vollstrecker on 18.01.08 at 13:53