Comments - gekomad/scala-regex-collection GitHub Wiki
Type name |
example |
Comments |
/* foo*/ bar |
Comments |
// foo |
import com.github.gekomad.regexcollection.Comments
import com.github.gekomad.regexcollection.Validate._
assert(findFirst[Comments]("/*foo*/ bar /*baz*/ 10% dg 55% ") == Some("/*foo*/"))
assert(findAll[Comments]("""/*foo*/ bar /*baz*/ 10% dg 55% """) == List("/*foo*/", "/*baz*/"))
assert(validate[Comments]("/*hi") == None)
assert(validate[Comments]("/*hi*/") == Some("/*hi*/"))
assert(validate[Comments]("""/*hi
|foo * */""".stripMargin) == Some("""/*hi
|foo * */""".stripMargin))