Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?:^|\t) ( [^\t\n]+(?=(?:\t|\n[^ ])) | [^\t\n]+(?=(?:\t|\n([ ]+))) ) #(|[ ]{20})#(?![ ]{3,}) #| #[^\t]+?(?=(?:\n)([ ]+)")
/
gxsm

Description

part 2 of two-step replacement routine: before: abc def gh gk n opq

after: 'abc def gh 'gk n opq

Submitted by anonymous - 6 years ago