String Search (Literal Pattern Match)

To get Metamorph to do a literal string (pattern matching) search type a slash `/' preceding the string. If you want to enter a whole line to be viewed as one string, put it in quotes, with the forward slash inside the quotes. Example:

"/Uncle Sam's soldiers"

This query will go and get each place in the textfiles being queried where that phrase is located, exactly as entered. Anything to the right of the slash, including a space before the word if you enter it so, will be considered part of the string; so don't enter a period or a space unless you want to look for one.

In the above example, "Uncle Sam's soldiers", you would get the same result whether a slash was entered or not, since there are no known equivalences for the phrase "Uncle Sam's soldiers". However, if you compare the following:

"/frame of mind"   (as compared to)  "frame of mind"

you will see that the Equivalence File has some equivalences associated with the phrase "frame of mind". To cut off those equivalences and just look for the pattern "frame of mind" you could insert the forward slash (/) as the first character of the phrase inside the quotes. (You could accomplish the same thing more efficiently by preceding the phrase with a tilde ~.)

When you denote a slash (/), remember that you're signalling the Metamorph Engine to use REX, bypassing the usual English word processing that goes on where PPM is the algorithm most often in use. REX can sometimes be more direct when such a task is all that is required.

While you can use a forward slash (/) in front of any fixed length pattern as is herein discussed, REX has many more uses which involve special characters. If such characters are part of your string and are therefore being inappropriately interpreted, use the backslash (\) to escape those characters inside your string; e.g., "43\.4" would indicate a literal decimal point (.), rather than its special meaning inside a REX expression.

Copyright © Thunderstone Software     Last updated: May 19 2023
Copyright © 2023 Thunderstone Software LLC. All rights reserved.