This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
sysadminery:sed [2025/05/06 15:43] – adam | sysadminery:sed [2025/05/06 15:48] (current) – adam | ||
---|---|---|---|
Line 5: | Line 5: | ||
| | ||
- | and since i'm sure you forgot: load is " | + | and since I'm sure you forgot: load is " |
- | anyway, let's get one of those numbers. Here's the regular expression | + | anyway, let's get one of those numbers. Here's the regular expression |
<code regex> | <code regex> | ||
Line 22: | Line 22: | ||
* escape the brackets. | * escape the brackets. | ||
* there is no '' | * there is no '' | ||
- | * don't escape the dot. | + | * don't escape the dot, to literally match '' |
* escape the braces. | * escape the braces. | ||
- | * Now, outside of the brackets, don't escape the dot. You'll notice that not escaping the dot now does the opposite. | + | * Now, outside of the brackets, don't escape the dot to match the wildcard character. You'll notice that not escaping the dot now does the opposite. |
* capture group 1 is not '' | * capture group 1 is not '' |