- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Comments
        Giuseppe Cannella edited this page Feb 19, 2020 
        ·
        2 revisions
      
    | 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))