Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?:(?s)\/\*((?:(?!\*\/).)*?)\*\/)
"

Description

Reads C comments as this "/* Do test / and removes / */ parts and leaves only comment part

Submitted by Shuhrat Rahimov - 9 years ago