Regular Expressions: Difference between revisions
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" |
insert image |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[File:Email-regex.svg|thumb]] | |||
Regex is short for Regular Expression and is a syntax that allows for powerful pattern matching. | Regex is short for Regular Expression and is a syntax that allows for powerful pattern matching. | ||
| Line 4: | Line 5: | ||
== Multiline Edits == | == Multiline Edits == | ||
Most graphical text editors or word processors have a single line input for the Search/Replace dialog. This is unsuitable for many text edit situations where the string you're looking to replace spans multiple lines. | Most graphical text editors or word processors have a single line input for the Search/Replace dialog. This is unsuitable for many text edit situations where the string you're looking to replace spans multiple lines. When using [[VSCode]], although the search and replace dialog is single line, it will dynamically expand to multiple lines if you COPY/PASTE multiple lines into the 'find' portion. You can also use the 'regex' option and line-terminator escapes in your pattern (e.g. "this \n will \n search across \n multiple lines"). | ||
== Single Line == | == Single Line == | ||