Regexes

org.specs2.text.Regexes
See theRegexes companion object
trait Regexes

This trait provides utility functions for working with regexes

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Regexes.type

Members list

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

Attributes

def regexPart: String

Attributes

Returns

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