Regular Expressions

Notepad++

See the excellent documentation. Some examples below:

To replace the start of a line up to a certain point with something like my favourite: ${CMAKE_CURRENT_SOURCE_DIR}

\R.+src/

You’ll need to replace with something like

\r\n    ${CMAKE_CURRENT_SOURCE_DIR}/

if you’re on Windows, otherwise more like:

\n    ${CMAKE_CURRENT_SOURCE_DIR}/

on a unix text file

Leave a Reply