RegEx
Utility class for building complex Regular Expressions
| since |
3.0.0 |
|---|---|
| package |
Joomla Framework |
Methods
anyOf
Define a list of alternative expressions.
anyOf(string|array regexList) :
Arguments
- regexList
string|array<string|int, mixed>A list of Regular Expressions to choose from
Response
stringThe modified Regular Expression
capture
Assign a key to an expression.
capture( regex, as = null) :
Arguments
- regex
stringThe Regular Expression to match- as
stringThe name of the component, used as index
Response
stringThe modified Regular Expression
match
Match the Regular Expression
match( regex, subject) : mixed||string|int
Arguments
- regex
stringThe Regular Expression- subject
stringThe string to check
Response
array<string|int, mixed>Captured values
noneOrMore
Add a 'zero or more' quantifier to an expression.
noneOrMore( regex) :
Arguments
- regex
stringThe Regular Expression to match
Response
stringThe modified Regular Expression
oneOrMore
Add a 'one or more' quantifier to an expression.
oneOrMore( regex) :
Arguments
- regex
stringThe Regular Expression to match
Response
stringThe modified Regular Expression
optional
Add a 'zero or one' quantifier to an expression.
optional( regex) :
Arguments
- regex
stringThe Regular Expression to match
Response
stringThe modified Regular Expression