Regular Expressions 101

Library entries

Regex to find if/while constructs

Vote

2

Regular Expression
pcre

/
(^if|^while|[ ;}\n]if|while)[ ]*([(]([^()]|(?2))*[)])
/
g

Description

Loading markdown...
Submitted by Deepak Subramanian - 6 years ago