Using ^^ in Scala Parser Combinators

When I am tring to use the

.r ^^ {....} syntax an error crops up saying :

value ^^ is not a member of scala.util.matching.Regex

I have already included

libraryDependencies += “org.scala-lang.modules” %% “scala-parser-combinators” % “1.1.2”

in the build.sbt file.

What could be the problem please ?

Thanks a lot and good day :slight_smile:

You forgot to import some implicit conversion, which creates a Parser[String] from a Regex.

See here

Otherwise, show your code.

1 Like

Thanks a lot for your help. :slight_smile:

Problem solved, without the need of making use of the Regexes

Thanks a lot and good day :slight_smile: