Anyone have an example for removal of Java like comments

@cbley I tried Fastparse but because I am using Scala 3 (no Scala 2 macros), it was not possible.

I am aware of the literals (found a reference to thees in a Gitter). I tried something similar here:

see [SOLVED] Parser combinator: removing comments

Not a one-time job. Preprocessing text before parsing in Scala.

I need to strip illegal comments from a JSON file.

I think my problem is knowing how to combine the literals. My example above fails with:

    val text1 =
      """
        |text1//comment1
        |text2
        |//comment2""".stripMargin