Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"""
("|')((?!(?!\\)(\1|\n))|(\\(.|\n))|((?!\\).))*?(\1)
"""
g

Description

This will allow for valid string parsing via a regex in popular interpreted languages like Lua, Python and Ruby.

Submitted by Siddharth Gupta - 7 years ago