<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Regular_Expressions</id>
	<title>Regular Expressions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Regular_Expressions"/>
	<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;action=history"/>
	<updated>2026-10-19T18:41:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6567&amp;oldid=prev</id>
		<title>Leo: /* Usage with sed */</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6567&amp;oldid=prev"/>
		<updated>2022-01-04T19:40:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage with sed&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:40, 4 January 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l109&quot;&gt;Line 109:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;=== Usage with sed ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;=== Usage with sed ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;When using &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;,  you need to escape &amp;lt;code&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[]&lt;/del&gt;&amp;lt;/code&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and &lt;/del&gt;&amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;. For example:  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;When using &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;,  you need to escape &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;special characters like &lt;/ins&gt;&amp;lt;code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;()&lt;/ins&gt;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;&amp;lt;code&amp;gt;{}&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;/&lt;/ins&gt;&amp;lt;/code&amp;gt;. For example:  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;{{Highlight&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;{{Highlight&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;| code = cat file {{!}} sed &#039;s/\(9[0-9]\{1\}%\)/&amp;lt;strong style=&quot;color:orange&quot;&amp;gt;\1&amp;lt;\/strong&amp;gt;/&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;| code = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$ &lt;/ins&gt;cat file {{!}} sed &#039;s/\(9[0-9]\{1\}%\)/&amp;lt;strong style=&quot;color:orange&quot;&amp;gt;\1&amp;lt;\/strong&amp;gt;/&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;| lang = terminal&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;| lang = terminal&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;[[Category:Guides]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;[[Category:Guides]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-6566:rev-6567:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6566&amp;oldid=prev</id>
		<title>Leo at 19:39, 4 January 2022</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6566&amp;oldid=prev"/>
		<updated>2022-01-04T19:39:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:39, 4 January 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A cheat sheet with regular expressions.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;== Special characters and their meanings ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;== Special characters and their meanings ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot;&gt;Line 105:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 105:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|Any character not part of the character classes: &amp;lt;code&amp;gt;[:upper:], [:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], [:xdigit:]&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|Any character not part of the character classes: &amp;lt;code&amp;gt;[:upper:], [:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], [:xdigit:]&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Other notes ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Usage with sed ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;When using &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;,  you need to escape &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;. For example: &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Highlight&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| code = cat file {{!}} sed &#039;s/\(9[0-9]\{1\}%\)/&amp;lt;strong style=&quot;color:orange&quot;&amp;gt;\1&amp;lt;\/strong&amp;gt;/&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| lang = terminal&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;[[Category:Guides]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;[[Category:Guides]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-6458:rev-6566:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6458&amp;oldid=prev</id>
		<title>Leo: Added category</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6458&amp;oldid=prev"/>
		<updated>2021-12-30T02:09:19Z</updated>

		<summary type="html">&lt;p&gt;Added category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:09, 30 December 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot;&gt;Line 105:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 105:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|Any character not part of the character classes: &amp;lt;code&amp;gt;[:upper:], [:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], [:xdigit:]&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|Any character not part of the character classes: &amp;lt;code&amp;gt;[:upper:], [:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], [:xdigit:]&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Guides]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-6254:rev-6458:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6254&amp;oldid=prev</id>
		<title>Leo: Created page with &quot;&lt;br /&gt;  == Special characters and their meanings == {| class=&quot;wikitable&quot; !Character !Meaning !Example |- |&lt;code&gt;*&lt;/code&gt; |Match &#039;&#039;&#039;zero, one or more&#039;&#039;&#039; of the previous |&lt;code&gt;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Regular_Expressions&amp;diff=6254&amp;oldid=prev"/>
		<updated>2021-12-12T06:18:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;br /&amp;gt;  == Special characters and their meanings == {| class=&amp;quot;wikitable&amp;quot; !Character !Meaning !Example |- |&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; |Match &amp;#039;&amp;#039;&amp;#039;zero, one or more&amp;#039;&amp;#039;&amp;#039; of the previous |&amp;lt;code&amp;gt;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Special characters and their meanings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Character&lt;br /&gt;
!Meaning&lt;br /&gt;
!Example&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|Match &amp;#039;&amp;#039;&amp;#039;zero, one or more&amp;#039;&amp;#039;&amp;#039; of the previous&lt;br /&gt;
|&amp;lt;code&amp;gt;Ca*&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Ca&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Caaaa&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;&lt;br /&gt;
|Match &amp;#039;&amp;#039;&amp;#039;zero or one&amp;#039;&amp;#039;&amp;#039; of the previous&lt;br /&gt;
|&amp;lt;code&amp;gt;Ca?&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Ca&amp;lt;/code&amp;gt;, but not &amp;lt;code&amp;gt;Caaa&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;&lt;br /&gt;
|Match &amp;#039;&amp;#039;&amp;#039;one or more&amp;#039;&amp;#039;&amp;#039; of the previous&lt;br /&gt;
|&amp;lt;code&amp;gt;Ca*&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;Ca&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Caaaa&amp;lt;/code&amp;gt;, but not &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
|Used to &amp;#039;&amp;#039;&amp;#039;escape&amp;#039;&amp;#039;&amp;#039; a special characters &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\ ? ( ) [ ] |&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;C:\\&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;C:\&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&lt;br /&gt;
|Wildcard character, matches &amp;#039;&amp;#039;&amp;#039;any&amp;#039;&amp;#039;&amp;#039; character&lt;br /&gt;
|&amp;lt;code&amp;gt;Ca.*&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;Canada&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Can&amp;#039;t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Caught&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;( )&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Group&amp;#039;&amp;#039;&amp;#039; characters&lt;br /&gt;
|See example for &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Can also be used for replacing text with &amp;lt;code&amp;gt;\1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;\2&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[ ]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Matches a &amp;#039;&amp;#039;&amp;#039;range&amp;#039;&amp;#039;&amp;#039; of characters&lt;br /&gt;
|&amp;lt;code&amp;gt;[cbf]ar&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;car&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;far&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;[0-9]+&amp;lt;/code&amp;gt; matches any integer.&lt;br /&gt;
&amp;lt;code&amp;gt;[a-zA-Z]&amp;lt;/code&amp;gt; matches ASCII letters a-z (upper and lower case)&lt;br /&gt;
&amp;lt;code&amp;gt;[^0-9]&amp;lt;/code&amp;gt; matches any character not 0-9&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|Matches previous &amp;#039;&amp;#039;&amp;#039;OR&amp;#039;&amp;#039;&amp;#039; next character/group&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;(Mon|Tues)day&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; matches &amp;quot;Monday&amp;quot; or &amp;quot;Tuesday&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;{ }&amp;lt;/code&amp;gt;&lt;br /&gt;
|Matches a specified &amp;#039;&amp;#039;&amp;#039;number of occurrences&amp;#039;&amp;#039;&amp;#039; of the previous&lt;br /&gt;
|&amp;lt;code&amp;gt;[a-z]{3}&amp;lt;/code&amp;gt; matches any 3 character string using characters a-z. Eg. &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;xyz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;[0-9]{2,4}&amp;lt;/code&amp;gt; matches any 2 to 4 digit number. Eg. 23, 349, 5934.&lt;br /&gt;
&amp;lt;code&amp;gt;[a-z0-9]{2,}&amp;lt;/code&amp;gt; matches any alpha-numeric lowercase string longer than 2 characters. Eg. &amp;lt;code&amp;gt;a9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;c1cd&amp;lt;/code&amp;gt;...&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Beginning&amp;#039;&amp;#039;&amp;#039; of a string or &amp;#039;&amp;#039;&amp;#039;negation&amp;#039;&amp;#039;&amp;#039; in a range.&lt;br /&gt;
|&amp;lt;code&amp;gt;^http:\/\/&amp;lt;/code&amp;gt; matches anything starting with &amp;lt;code&amp;gt;http://&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[^0-9]&amp;lt;/code&amp;gt; matches any character not 0-9.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;End&amp;#039;&amp;#039;&amp;#039; of a string.&lt;br /&gt;
|&amp;lt;code&amp;gt;\.exe$&amp;lt;/code&amp;gt; matches anything ending with &amp;lt;code&amp;gt;.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== POSIX character classes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Character Class&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:alpha:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any letter, &amp;lt;code&amp;gt;[A-Za-z]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:upper:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any uppercase letter, &amp;lt;code&amp;gt;[A-Z]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:lower:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any lowercase letter, &amp;lt;code&amp;gt;[a-z]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:digit:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any digit, &amp;lt;code&amp;gt;[0-9]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:alnum:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any alphanumeric character, &amp;lt;code&amp;gt;[A-Za-z0-9]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:xdigit:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any hexadecimal digit, &amp;lt;code&amp;gt;[0-9A-Fa-f]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:space:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|A tab, new line, vertical tab, form feed, carriage return, or space&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:blank:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|A space or a tab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:print:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any printable character&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:punct:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any punctuation character: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;! &amp;#039; # S % &amp;amp; &amp;#039; ( ) * + , - . / : ; &amp;lt; = &amp;gt; ? @ [ / ] ^ _ { | } ~&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:graph:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any character defined as a printable character except those defined as part of the space character class&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:word:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Continuous string of alphanumeric characters and underscores.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:ascii:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|ASCII characters, in the range: 0-127&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[:cntrl:]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Any character not part of the character classes: &amp;lt;code&amp;gt;[:upper:], [:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], [:xdigit:]&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
</feed>