Regexes

trait Regexes

This trait provides utility functions for working with regexes

Companion:
object
class Object
trait Matchable
class Any
object Regexes.type

Extensions

Extensions

extension (p: Pattern)
def regexPart: String
extension (r: Regex)
def matches(s: String): Boolean
extension (s: String)
infix def matchesSafely(p: String, enclosing: String): Boolean

matchesSafely a pattern p. If p cannot be compiled, then it is quoted if the string s is enclosed with characters, they can be excluded before the quotation is done

matchesSafely a pattern p. If p cannot be compiled, then it is quoted if the string s is enclosed with characters, they can be excluded before the quotation is done

def regexPart: String
Returns:

a regular expression String matching 's' inside another string, possibly multi-string