input: Write a python function to solve linear equations of the form 'ax + b = c'.
  assert solve_linear_eq('3x + 5 = 10') == 5/3
  assert solve_linear_eq('4x - 2 = 10') == 3
  assert solve_linear_eq('2x + 3 = 7') == 2
output: def solve_linear_eq(equation):
      import re
      # Extract coefficients and constants
      match = re.match(r'(-?\d*)x\s*([+-]?\s*\d+)\s*=\s*(-?\d+)', equation.replace(' ', ''))
      a = int(match.group(1)) if match.group(1) not in ("", "-") else int(match.group(1) + "1")
      b = int(match.group(2).replace(" ", ""))
      c = int(match.group(3))
      # Solve for x
      x = (c - b) / a
      return x