C++ regex matching a single character : I'm trying to match a single character '=' in a line of code with regex.

Example

    if(y == 5 || x = 1) {
      Do something ...
    }

I want to match to the single '=', and not the "==". I've tried alot of combination of regex strings but I still can't get a match on the correct position. 