changeset 62:7fe3cfba9c85

learn regex
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Jun 2024 17:29:10 -0600
parents 13faddead6cb
children e8122e01e2dd
files src/learn.html.luan
diffstat 1 files changed, 20 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/learn.html.luan	Thu May 09 20:35:26 2024 -0600
+++ b/src/learn.html.luan	Sun Jun 09 17:29:10 2024 -0600
@@ -51,6 +51,26 @@
 <%
 		end
 	}
+	regex = {
+		title = [[Regular Expressions]]
+		content = function()
+%>
+<p><a href="https://en.wikipedia.org/wiki/Regular_expression">Regular expressions</a>, or regex for short, are used for searching or matching text.  Since this is such a common need, regex are found everywhere in programming.  Since you just learned Bash, you can learn regex with the <a href="https://en.wikipedia.org/wiki/Grep">grep</a> command that uses regex.</p>
+
+<p>Unlike with Bash, there are a few decent grep tutorials, so I don't have to write my own.  Here they are:</p>
+
+<ul>
+<li><a href="https://vegastack.com/tutorials/regular-expressions-in-grep/">Regular Expressions in Grep</a></li>
+<li><a href="https://cs.nyu.edu/~mohri/unix08/lect4">Regular Expressions</a></li>
+<li><a href="https://www.gnu.org/software/grep/manual/grep.html">GNU Grep</a></li>
+</ul>
+
+<p>I suggest that you just read through these tutorials so that you get a sense for how regex and grep work.  You don't need to practice anything here.  You can come back to these tutorials later when you have a real need for regex or grep.</p>
+
+<p>If you become a serious programmer, then you should have a deeper understanding of regex.  In that case I recommend the book <a href="https://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124/">Mastering Regular Expressions</a>.</p>
+<%
+		end
+	}
 	hg = {
 		title = [[Mercurial - Source Control]]
 		content = function()
@@ -228,14 +248,6 @@
 <%
 		end
 	}
-	regex = {
-		title = [[Regular Expressions]]
-		content = function()
-%>
-<p>later</p>
-<%
-		end
-	}
 	java = {
 		title = [[Java 8]]
 		content = function()