title: Scala Regex for less than equal to operator (<=)
body: <p>I am trying to parse an expression with (&lt;, &lt;=, >=, >). All but &lt;= works just fine. Can someone help what could be the issue.
  Code:</p>
  
  <pre><code>object MyTestParser extends RegexParsers {
    override def skipWhitespace = true
  
    private val expression: Parser[String] = """[a-zA-Z0-9\.]+""".r
  
    val operation: Parser[Try[Boolean]] =
      expression ~ ("&lt;" | "&lt;=" | "&gt;=" | "&gt;") ~ expression ^^ {
        case v1 ~ op ~ v2 =&gt; for {
          a &lt;- Try(v1.toDouble)
          b &lt;- Try(v2.toDouble)
        } yield op match {
          case "&lt;" =&gt; a &lt; b
          case "&lt;=" =&gt; a &lt;= b
          case "&gt;" =&gt; a &gt; b
          case "&gt;=" =&gt; a &gt;= b
        }
    }
  }
  </code></pre>
  
  <p>Test:</p>
  
  <pre><code>"MyTestParser" should {
      "successfully parse &lt;= condition" in {
        val parser = MyTestParser.parseAll(MyTestParser.operation, "10 &lt;= 20")
        val result = parser match {
          case MyTestParser.Success(s, _) =&gt; s.get
          case MyTestParser.Failure(e, _) =&gt;
            println(s"Parsing failed with error: $e")
            false
          case MyTestParser.Error(e, _) =&gt;
            println(s"Parsing error: $e")
            false
        }
        result === true
      }
  
      "successfully parse &gt;= condition" in {
        val result = MyTestParser.parseAll(MyTestParser.operation, "50 &gt;= 20").get
        result === scala.util.Success(true)
      }
    }
  </code></pre>
  
  <p>Error for &lt;= condition:</p>
  
  <pre><code>Parsing failed with error: string matching regex `[a-zA-Z0-9\.]+' expected but `=' found
  </code></pre>