Regular Expressions: Difference between revisions

m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
remove old Quanta reference
Line 4: Line 4:


== 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").
 
'''Quanta''' integrates '''KFileReplace''', which you can launch standalone or use within Quanta to do multiline regex-capable search and replace.  Since the 'Advanced Search/Replace' dialog does not allow multiline text input, it's a bit awkward to do this from Quanta.  However, once the KFileReplace part is open in Quanta, you can edit your search session any way you like including entering multiple line text as the search 'needle'.
 
To launch KFileReplace standalone, press the 'Alt + F2' keys and type 'KFileReplace' (enter)


== Single Line ==
== Single Line ==