Regular Expressions 101

Community Patterns

Triple Quoted String

1

Regular Expression
PCRE (PHP <7.3)

/
"""(?:(?!""").)*(?:"{1,2}(?!"""))?"""
/
g

Description

More powerful than python style, this supports things like """" """", which matches totally. Also supports """a""""""b""", where there are two matches: """a""","""b""".

Submitted by Flaviu - 10 years ago