https://wiki.edge.arista.com/index.php?title=Glob_Matcher&feed=atom&action=historyGlob Matcher - Revision history2024-03-29T08:29:36ZRevision history for this page on the wikiMediaWiki 1.41.0https://wiki.edge.arista.com/index.php?title=Glob_Matcher&diff=26071&oldid=prevJcoffin at 23:45, 13 February 20192019-02-13T23:45:49Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:45, 13 February 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l42">Line 42:</td>
<td colspan="2" class="diff-lineno">Line 42:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "*" matches all values except null/unset</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "*" matches all values except null/unset</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "" matches null and nothing else</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "" matches null and nothing else</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* All glob matching is case insensitive</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* All glob matching is case insensitive <ins style="font-weight: bold; text-decoration: none;">for domains but case sensitive for all other matches.</ins></div></td></tr>
</table>Jcoffinhttps://wiki.edge.arista.com/index.php?title=Glob_Matcher&diff=20967&oldid=prevDmorris at 00:19, 9 November 20172017-11-09T00:19:13Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:19, 9 November 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l42">Line 42:</td>
<td colspan="2" class="diff-lineno">Line 42:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "*" matches all values except null/unset</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "*" matches all values except null/unset</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "" matches null and nothing else</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* "" matches null and nothing else</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* All glob matching is case insensitive</ins></div></td></tr>
</table>Dmorrishttps://wiki.edge.arista.com/index.php?title=Glob_Matcher&diff=2410&oldid=prevDmorris at 20:48, 18 October 20132013-10-18T20:48:38Z<p></p>
<p><b>New page</b></p><div>A Glob is a common way to match strings of characters against rules. An Untangle glob is similar to the syntax commonly used on Microsoft OSs to match filenames (example: "rm *.exe").<br />
<br />
A glob matcher has two special characters: "*" means 0 or more of any characters (excluding return charater) and "?" means exactly 1 of any character (excluding return character).<br />
<br />
{| border="1" cellpadding="2"<br />
|+<br />
! Example !! String !! Description<br />
|- <br />
| String<br />
| XYZ<br />
| matches "XYZ" but NOT "xYZ" and NOT "XYZZ"<br />
|- <br />
| String with *<br />
| X*Z<br />
| matches "XZ" and "XYZ" and "XYYZ" and "XyyyabcZ" but NOT "xYZ" and NOT "XYZA"<br />
|- <br />
| String with *<br />
| X*Z*<br />
| matches "XZ" and "XYZ" and "XYYZ" and "XyyyabcZ" and "XYZA" but NOT "xYZ"<br />
|-<br />
| String with ?<br />
| X?Z<br />
| matches "XYZ" and "XyZ" but NOT match "XZ" or "XYYZ"<br />
|-<br />
| List of Globs<br />
| X,Z<br />
| matches "X" and "Z" but NOT match "Y" or "X,Z"<br />
|-<br />
|}<br />
<br />
Globs are often used in rules like URL rules and filename rules to match various strings.<br />
The left and rights side are implicitly anchored. If you wish to match if a string contains the match you will need to use "*foo*".<br />
<br />
For those familiar with regular expression you can derive the glob equivalent by doing the following:<br />
<br />
* replace "." with "\." to escape the special meaning of "." in regular expressions<br />
* replace "?" with "." to match any character<br />
* replace "*" with ".*" to match zero or more characters<br />
<br />
Note:<br />
<br />
* "*" matches all values except null/unset<br />
* "" matches null and nothing else</div>Dmorris