Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?:\"(?:(?<=\"(?=[^\n]))[^\n]+?(?=(?<!\\))(?=\"))?\")|(\B'(?:(?<='(?=[^\n]))[^\n]+?(?=(?<!\\))(?='))?')
/
gm

Description

All Strings on One Line

  • Php
  • java
  • javascript
  • python
  • escapes all regex
  • sq inside dq pair
  • dq insside sq pair
Submitted by kai gouthro - a year ago (Last modified a year ago)