Data.String.VerEx
- Package
- purescript-verbal-expressions
- Repository
- VerbalExpressions/purescript-verbal-expressions
This module contains a free monad implementation of Verbal Expressions. for PureScript.
#VerExReplace Source
type VerExReplace = VerExM String
A monadic action that constructs a Verbal Expression and returns a replacement string.
#VerExMatch Source
type VerExMatch = VerExM (Array CaptureGroup)
A monadic action that constructs a Verbal Expression and returns an array of capture group indices.
#CaptureGroup Source
newtype CaptureGroup
#startOfLine' Source
startOfLine' :: Boolean -> VerExM Unit
Set whether or not the expression has to start at the beginning of the
line. Default: false
.
#startOfLine Source
startOfLine :: VerExM Unit
Mark the expression to start at the beginning of the line.
#endOfLine' Source
endOfLine' :: Boolean -> VerExM Unit
Set whether or not the expression has to end at the end of the line.
Default: false
.
#whitespace Source
whitespace :: VerExM Unit
Any whitespace character
#withAnyCase Source
withAnyCase :: VerExM Unit
Enable case-insensitive matching
#capture Source
capture :: VerEx -> VerExM CaptureGroup
Add a new capture group which matches the given VerEx. Returns the index of the capture group.
#findAgain Source
findAgain :: CaptureGroup -> VerExM Unit
Match a previous capture group again (back reference).
#replaceWith Source
replaceWith :: String -> VerExReplace
Replace the matched string with the given replacement.
#insert Source
insert :: CaptureGroup -> String
Add the contents of a given capture group in the replacement string.
- Modules
- Data.
String. VerEx