Regex to check for new line

I want to check if an if statement is on one line or the next line without a brace like so:

if (blah === blah)
    do something

or:

if (foo === foo) do something

The regex i have currently is

/\)(?!.*\{)/

But doesnt work. Anyone have any ideas?

To elaborate the only If statement that would not be pulled by this regex is the following:

if (foo === bar)
{

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)