Module cream.regex
API for perl compatible regular expression
Author:
| David Delassus <david.jose.delassus@gmail.com> |
Functions
| Regex:match (str) | Scans for a match in string for pattern |
| Regex:replace (str, replace) | Replaces all occurrences of the pattern in regex with the replacement text |
| cream.regex (pattern) | Create a new perl compatible regular expression |
Functions
- Regex:match (str)
-
Scans for a match in string for pattern
Parameters
- str: String to scan
Return value:
TRUEis the string matched,FALSEotherwise - Regex:replace (str, replace)
-
Replaces all occurrences of the pattern in regex with the replacement text
Parameters
- str: String to scan
- replace: Replace all occurrences with this string
Return value:
The new string on success,nilotherwise - cream.regex (pattern)
-
Create a new perl compatible regular expression
Parameters
- pattern: The regex pattern
Return value:
A new regex