Regular Expressions 101

Community Patterns

4 spaces and tabs mixed indentation replace pattern

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?:^|\G)( {4}|\t)
/
mg

Description

With this expression you can easily replace the indentation from 4 spaces and tabs mixed indented file to a pure indentation.

Submitted by hNczy - 2 years ago