Regex – Cheat Sheet – Basic – Anchors
All the examples below have been tested in Notepad++. Notepad++ can be found here. These examples can also work in other platforms with some minor syntax changes to them. Anchors Types Of Anchors ^ used to denotate the start of a string or line $ used to denote the end of a string or line Use Case for ^ Let’s say we have the list below and we want to add the letter G to the start of all the strings below. Press Ctrl + H to bring up the replace window in Notepad++ or your set shortcut key for it. In order for this to work you have to set the following: Ensure that the text cursor is at the start of the list or that all the text is selected (by using Ctrl + A). ^ in Find what section. G in Replace with section. Ensure that the…