Notepad++ snippets

How to find spaces into field names in Notepad++

Let say you have the following query:

Notepad++ replace 1

SELECT [Name],[Population],[Area km3]
FROM cities

and you want to find if any of the field names contain any space.

Notepad++ replace 3

To do this in Notepad++, you can just hit CTRL + F for Find window and the select the following:

Notepad++ replace 2

  • Find what: (?<=\[)(\w+) "
  • Flag Regular expression
  • Do not flag . matches new lines

Back to Notepad++ cookbook page