on-internet
← Community

Regular expression for C if statementch

Stack Overflow ·

What is the regular expression for a C if statement? I am trying this Perl code, but it does not match: if ( $line !~ /^if \(.\) \{/) { I expect it to match this C code: if ( a ==b ) {

Comments

Sign in or sign up to comment and upvote.

No comments yet.