Maxxsonics MAXX-2400HD manual Finding Clips Using Regular Expressions

Models: MAXX-2400HD

1 139
Download 139 pages 1.56 Kb
Page 59
Image 59
Finding Clips Using Regular Expressions

Finding Clips Using Regular Expressions

A regular expression (“RE”) specifies a pattern to be matched in a clip name. Regular expressions can contain both special and ordinary characters. Ordinary characters just match themselves. Thus, the RE “night” would match the “night” in the clip name “Tonight Show”, so this and any other clip name with “night” in it would be placed in the list of found clips.

The following special characters are supported:

.(dot) This matches any single character. “a.c” matches “abc”, “aac”, “a2c” and “a c” but not “acd”.

^(caret) This matches the start of a clip name. To find all clips starting with “xyz”, for example, use the Regular Expression “^xyz”.

$Match the end of the clip name. To find all clips ending in “xyz” use the RE “xyz$”.

<Match the beginning of a word. For example “<Show” will match all clip names containing a word that starts with “Show”, such as “Now Showing”, but not “LateShow”.

>Match the end of a word.

*Match zero or more repetitions of the preceding character. “.*” will match anything – “G.*N.*” will match “Georgia Evening News” or “Good Night”.

+Match 1 or more repetitions of the preceding RE.

?The preceding Regular Expression term is optional. “ab?c” will match “ac” or “abc” but not “adc”.

[] Used to indicate a set of characters. Characters can be listed individually, or a range of characters can be indicated by giving two characters and separating them by a "-". Special characters are not active inside sets. For example, [a+$] will match any of the characters "a", "+", or "$"; [a-z] will match any lowercase letter, and [a-zA-Z0-9] matches any letter or digit. If you want to include a "-" inside a set, precede it with a backslash, or place it as the first character. You can match all characters that are not within the set by making "^" as the first character of the set; "^" elsewhere will simply match the "^" character. For example, [^7] will match any character except "7".

SPACE A space is treated as an ordinary character. “ Show “ (<space>Show) will match “Tonight Show” but not “Now Showing” or "NewShow”. “ “ will match any clip with a space in the name.

The subject of Regular Expressions is much larger than can be covered here. Further information will be found on the internet.

MAXX-2400HD Owner’s Manual

Page 59

Page 59
Image 59
Maxxsonics MAXX-2400HD manual Finding Clips Using Regular Expressions