1

After reading in Wikipedia here about tab characters I understand there are many. That is, many characters can represent a tabulation indent.

What is the character that uses for tabulation indentation in Notepad++, or at least, how could I know what is it exactly (I am very new to programming and not learning C++ and I feel searching for such data in the Notepad++ source code would now be a waste of time for me).

I need this data to write a script.

  • 2
    It uses the TAB character (ASCII 9). – Ƭᴇcʜιᴇ007 May 2 '17 at 15:50
  • PCMIIW, it is represented in \s as in sed 's/^\s*//g'? – JohnDoea May 2 '17 at 15:54
  • 2
    \s is not a character. It matches any whitespace character. – Steven May 2 '17 at 16:59
3

When you press a tab key in NPP it adds either usual \t = \0x09 character or a sequence of spaces \0x20 according to following setting:

Settings screenshot

1

You can view whitespace characters in Notepad++. Select View (menu), Show Symbol, Show All Characters. Dots are spaces (0x20). Arrows are tabs (0x09).

Notepad++ Regular Expressions provide several special control characters to match specific text.

Specifically \s is not a character itself. It matches any single whitespace character.

\s
A spacing character: space, EOLs and tabs count. Same as [[:space:]].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.