comparison src/learn.html.luan @ 62:7fe3cfba9c85

learn regex
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Jun 2024 17:29:10 -0600
parents 13faddead6cb
children e8122e01e2dd
comparison
equal deleted inserted replaced
61:13faddead6cb 62:7fe3cfba9c85
46 bash = { 46 bash = {
47 title = [[Bash - Command Line Shell]] 47 title = [[Bash - Command Line Shell]]
48 content = function() 48 content = function()
49 %> 49 %>
50 <p><a href="bash.html">Bash</a> is the other basic tool for reactionary programmers. I was hoping to just reference existing Bash tutorials in this lesson, but they are all horrible, so I am writing my own. So for this lesson, please read <a href="learn_bash.html">my tutorial</a>.</p> 50 <p><a href="bash.html">Bash</a> is the other basic tool for reactionary programmers. I was hoping to just reference existing Bash tutorials in this lesson, but they are all horrible, so I am writing my own. So for this lesson, please read <a href="learn_bash.html">my tutorial</a>.</p>
51 <%
52 end
53 }
54 regex = {
55 title = [[Regular Expressions]]
56 content = function()
57 %>
58 <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>
59
60 <p>Unlike with Bash, there are a few decent grep tutorials, so I don't have to write my own. Here they are:</p>
61
62 <ul>
63 <li><a href="https://vegastack.com/tutorials/regular-expressions-in-grep/">Regular Expressions in Grep</a></li>
64 <li><a href="https://cs.nyu.edu/~mohri/unix08/lect4">Regular Expressions</a></li>
65 <li><a href="https://www.gnu.org/software/grep/manual/grep.html">GNU Grep</a></li>
66 </ul>
67
68 <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>
69
70 <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>
51 <% 71 <%
52 end 72 end
53 } 73 }
54 hg = { 74 hg = {
55 title = [[Mercurial - Source Control]] 75 title = [[Mercurial - Source Control]]
226 %> 246 %>
227 <p>later</p> 247 <p>later</p>
228 <% 248 <%
229 end 249 end
230 } 250 }
231 regex = {
232 title = [[Regular Expressions]]
233 content = function()
234 %>
235 <p>later</p>
236 <%
237 end
238 }
239 java = { 251 java = {
240 title = [[Java 8]] 252 title = [[Java 8]]
241 content = function() 253 content = function()
242 %> 254 %>
243 <p>later</p> 255 <p>later</p>