[STORM] Search Help--Perl regular expressions


Go back to search page.

When searching the article archive, multiple regular expressions can be used in the search. The effect is to perform a logical and of each of the search expressions. For example, if ``parallel functional'' is used as the search expression, then only articles containing both ``parallel'' and ``functional'' will be displayed. Searching the archive is also case insensitive, therefore ``PVM'' and ``pvm'' are treated in exactly the same way.

Useful tips

A common problem when searching is pulling in far more of the database than was intended. When searching for "MPI", then among your responses will be papers with words such as "compiling" within them. A solution to this problem is to use the perl regular expression "\bMPI\b" to match the word boundaries of "MPI".

Common pitfalls

Because the expressions used in the search are Perl regular expressions, then searching for ``C++'' probably won't have the effect you were expecting. The expression means one or more occurrence of the letter C, one or more times. If you want to search for C++ use ``C\+\+''.

A quick overview of Perl regular expressions

The following table taken from the Perl book (Larry Wall and Randal L Schwartz, ``Programming Perl'', O'Reilly & Associates), summarizes Perl's regular expressions.
Reg-expr   | Description
-----------+---------------------------------------------------
.          | Matches any character except newline
[a-z0-9]   | Matches any single character of the set
[^a-z0-9]  | Matches any single character not in set
\d         | Matches a digit,                   i.e., [0-9]
\w         | Matches a alpha-numeric character, i.e., [a-zA-Z0-9_]
\W         | Matches a non-word character,      i.e., [^a-zA-Z0-9_]
\metachar  | Matches the character itself,      i.e., \|, \*, \+
x?         | Matches 0 or 1 x's, where x is any of the above
x*         | Matches 0 or more x's
x+         | Matches 1 or more x's
x{m,n}     | Matches at least m x's but no more than n
foo|bar    | Matches one of foo or bar
(x)        | Brackets a regular expression (this is a bit of a lie :-)
\b         | Matches a word boundary
You probably won't need to search using regular expressions, but you may find it useful when cutting down the scope of a search. For example if you wanted to search for documents that are concerned with either Fortran 90 or Fortran M, then you could use the expression Fortran\s?(90|M). The optional space (i.e., \s?) is useful to select articles that people have forgotten to put a space between the ``Fortran'' and the ``90''. Then again it's probably easier just searching for ``Fortran'' :-)

The following are more complete introductions to Perl regular expressions:


Go back to search page.
[Help] [Comments]  | [MTSU]  | [Home] Return to STORM home page