Skip to content

Commit bbcb76d

Browse files
added post on substitution with ripgrep
1 parent 83ab6c7 commit bbcb76d

File tree

12 files changed

+1060
-24
lines changed

12 files changed

+1060
-24
lines changed

Diff for: atom.xml

+171-1
Large diffs are not rendered by default.

Diff for: index.html

+21-20
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,27 @@
111111

112112
<article class="post">
113113

114+
<header class="post__header">
115+
<h1 class="post__title">
116+
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;substitution-with-ripgrep&#x2F;">Search and replace tricks with ripgrep</a>
117+
</h1>
118+
<div class="post__meta">
119+
<span class="post__time">2020-09-16</span>
120+
121+
</div>
122+
</header>
123+
124+
<div class="post__summary">
125+
<p><a href="https://github.com/BurntSushi/ripgrep">ripgrep</a> (command name <code>rg</code>) is a <code>grep</code> tool, but supports search and replace as well. <code>rg</code> is far from a like-for-like alternate for <code>sed</code>, but it has nifty features like multiline replacement, fixed string matching, <code>PCRE2</code> support, etc. This post gives an overview of syntax for substitution and highlights some of the cases where <code>rg</code> is a handy replacement for <code>sed</code>.</p>
126+
127+
</div>
128+
<div class="read-more">
129+
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;substitution-with-ripgrep&#x2F;">Read more...</a>
130+
</div>
131+
</article>
132+
133+
<article class="post">
134+
114135
<header class="post__header">
115136
<h1 class="post__title">
116137
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;python-intermediate&#x2F;">I know Python basics, what next?</a>
@@ -195,26 +216,6 @@ <h1 class="post__title">
195216
</div>
196217
</article>
197218

198-
<article class="post">
199-
200-
<header class="post__header">
201-
<h1 class="post__title">
202-
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;python-regex-book-version2&#x2F;">Example driven book on Python regular expressions</a>
203-
</h1>
204-
<div class="post__meta">
205-
<span class="post__time">2019-08-09</span>
206-
207-
</div>
208-
</header>
209-
210-
<div class="post__summary">
211-
212-
</div>
213-
<div class="read-more">
214-
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;python-regex-book-version2&#x2F;">Read more...</a>
215-
</div>
216-
</article>
217-
218219
</div>
219220
<nav class="pagination">
220221

Diff for: page/2/index.html

+20
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,26 @@
111111

112112
<article class="post">
113113

114+
<header class="post__header">
115+
<h1 class="post__title">
116+
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;python-regex-book-version2&#x2F;">Example driven book on Python regular expressions</a>
117+
</h1>
118+
<div class="post__meta">
119+
<span class="post__time">2019-08-09</span>
120+
121+
</div>
122+
</header>
123+
124+
<div class="post__summary">
125+
126+
</div>
127+
<div class="read-more">
128+
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;python-regex-book-version2&#x2F;">Read more...</a>
129+
</div>
130+
</article>
131+
132+
<article class="post">
133+
114134
<header class="post__header">
115135
<h1 class="post__title">
116136
<a href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;grep-book-announcement&#x2F;">GNU GREP and RIPGREP</a>

Diff for: python-intermediate/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ <h2 id="more-python-resources">More Python resources<a class="zola-anchor" href=
274274
<a class="previous" href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;customizing-pandoc&#x2F;">‹ Customizing pandoc to generate beautiful pdf and epub from markdown</a>
275275

276276

277+
<a class="next" href="https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;substitution-with-ripgrep&#x2F;">Search and replace tricks with ripgrep ›</a>
278+
277279

278280

279281
</div>

Diff for: sitemap.xml

+13
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
<loc>https://learnbyexample.github.io/python-regex-cheatsheet/</loc>
5252
<lastmod>2020-07-03</lastmod>
5353
</url>
54+
<url>
55+
<loc>https://learnbyexample.github.io/substitution-with-ripgrep/</loc>
56+
<lastmod>2020-09-16</lastmod>
57+
</url>
5458
<url>
5559
<loc>https://learnbyexample.github.io/tags/</loc>
5660
</url>
@@ -84,6 +88,9 @@
8488
<url>
8589
<loc>https://learnbyexample.github.io/tags/examples/</loc>
8690
</url>
91+
<url>
92+
<loc>https://learnbyexample.github.io/tags/fixed-string/</loc>
93+
</url>
8794
<url>
8895
<loc>https://learnbyexample.github.io/tags/gnu-grep/</loc>
8996
</url>
@@ -105,6 +112,9 @@
105112
<url>
106113
<loc>https://learnbyexample.github.io/tags/maths/</loc>
107114
</url>
115+
<url>
116+
<loc>https://learnbyexample.github.io/tags/multiline/</loc>
117+
</url>
108118
<url>
109119
<loc>https://learnbyexample.github.io/tags/pandoc/</loc>
110120
</url>
@@ -129,6 +139,9 @@
129139
<url>
130140
<loc>https://learnbyexample.github.io/tags/shell-scripting/</loc>
131141
</url>
142+
<url>
143+
<loc>https://learnbyexample.github.io/tags/substitution/</loc>
144+
</url>
132145
<url>
133146
<loc>https://learnbyexample.github.io/tags/tutorial/</loc>
134147
</url>

0 commit comments

Comments
 (0)