FSharpVerbalExpressions


FsRegEx

Namespace: FsVerbalExpressions

Composable regular expressions functions.

Functions and values

Function or valueDescription
capture (...)
Signature: regularExpression:string -> groupName:string -> input:string -> string

Match and select groupname value.

captureGroup (...)
Signature: regularExpression:string -> groupName:string -> input:string -> FsGroup

Match and select group.

captureGroupOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> groupName:string -> input:string -> FsGroup

Match and select group with Regex options.

captureOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> groupName:string -> input:string -> string

Match and select groupname value with Regex options.

firstMatch regularExpression input
Signature: regularExpression:string -> input:string -> FsMatch

Searches the specified input string for the first occurrence of the regular expression.

firstMatchOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> input:string -> FsMatch

Searches the specified input string for the first occurrence of the regular expression with Regex options.

groupNames regularExpression
Signature: regularExpression:string -> string array

Returns an array of capturing group names for the regular expression.

groupNumbers regularExpression
Signature: regularExpression:string -> int array

Returns an array of capturing group numbers that correspond to group names in an array.

isMatch regularExpression input
Signature: regularExpression:string -> input:string -> bool

Indicates whether the regular expression finds a match in the input string.

isMatchAt (...)
Signature: regularExpression:string -> startAt:int -> input:string -> bool

Indicates whether the regular expression finds a match in the input string beginning at the specified starting position.

isMatchAtOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> startAt:int -> input:string -> bool

Indicates whether the regular expression finds a match in the input string beginning at the specified starting position with Regex options.

isMatchOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> input:string -> bool

Indicates whether the regular expression finds a match in the input string with Regex options.

matchAt regularExpression startAt input
Signature: regularExpression:string -> startAt:int -> input:string -> FsMatch

Searches the specified input string for the first occurrence of the regular expression beginning at the specified starting position.

matchAtFor (...)
Signature: regularExpression:string -> startAt:int -> length:int -> input:string -> FsMatch

Searches the specified input string for the first occurrence of the VerbExbeginning at the starting position for the length.

matchAtForOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> startAt:int -> length:int -> input:string -> FsMatch

Searches the specified input string for the first occurrence of the VerbExbeginning at the starting position for the length with Regex options.

matchAtOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> startAt:int -> input:string -> FsMatch

Searches the specified input string for the first occurrence of the regular expression beginning at the specified starting position with Regex options.

matches regularExpression input
Signature: regularExpression:string -> input:string -> FsMatch []

Searches the specified input string for all occurrences of a regular expression with Regex options.

matchesAt (...)
Signature: regularExpression:string -> startAt:int -> input:string -> FsMatch []

Searches the input string for all occurrence of a regular expression, beginning at the specified starting position.

matchesAtOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> startAt:int -> input:string -> FsMatch []

Searches the input string for all occurrence of a regular expression, beginning at the specified starting position with Regex options.

matchesOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> input:string -> FsMatch []

Searches the specified input string for all occurrences of a regular expression.

replace (...)
Signature: regularExpression:string -> replacement:string -> input:string -> string

In input string replaces all strings that match regular expression pattern with replacement string.

replaceByMatch (...)
Signature: regularExpression:string -> evalutor:MatchEvaluator -> input:string -> string

In input string replaces all strings that match regular expression with string returned by MatchEvaluator delegate.

replaceByMatchMaxTimes (...)
Signature: regularExpression:string -> evalutor:MatchEvaluator -> count:int -> input:string -> string

In input string replaces a specified maximum number of strings that match a regular expression with string returned by MatchEvaluator delegate.

replaceByMatchMaxTimesOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> evalutor:MatchEvaluator -> count:int -> input:string -> string

In input string replaces a specified maximum number of strings that match a regular expression with string returned by MatchEvaluator delegate with Regex options.

replaceByMatchMaxTimesStartAt (...)
Signature: regularExpression:string -> evalutor:MatchEvaluator -> count:int -> startAt:int -> input:string -> string

In input string beginning at start at position replaces a specified maximum number of strings that match a regular expression with string returned by MatchEvaluator delegate.

replaceByMatchMaxTimesStartAtOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> evalutor:MatchEvaluator -> count:int -> startAt:int -> input:string -> string

In input string beginning at start at position replaces a specified maximum number of strings that match a regular expression with string returned by MatchEvaluator delegate with Regex options.

replaceByMatchOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> evalutor:MatchEvaluator -> input:string -> string

In input string replaces all strings that match regular expression with string returned by MatchEvaluator delegate with Regex options.

replaceMaxTimes (...)
Signature: regularExpression:string -> replacement:string -> count:int -> input:string -> string

In input string replaces a specified maximum number of strings that match regular expression with replacement string.

replaceMaxTimesOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> replacement:string -> count:int -> input:string -> string

In input string replaces a specified maximum number of strings that match regular expression with replacement string with Regex options.

replaceMaxTimesStartAt (...)
Signature: regularExpression:string -> replacement:string -> count:int -> startAt:int -> input:string -> string

In input string beginning at start at position replaces a specified maximum number of strings that match regular expression with replacement string.

replaceMaxTimesStartAtOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> replacement:string -> count:int -> startAt:int -> input:string -> string

In input string beginning at start at position replaces a specified maximum number of strings that match regular expression with replacement string with Regex options.

split regularExpression input
Signature: regularExpression:string -> input:string -> string array

Splits input string into an array of substrings at the positions defined by regular expression.

splitMaxTimes (...)
Signature: regularExpression:string -> count:int -> input:string -> string array

Splits input string a specified maximum number of times into an array of substrings at the positions defined by regular expression.

splitMaxTimesOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> count:int -> input:string -> string array

Splits input string a specified maximum number of times into an array of substrings at the positions defined by regular expression with Regex options.

splitMaxTimesStartAt (...)
Signature: regularExpression:string -> count:int -> startAt:int -> input:string -> string array

Splits input string, begining at start position, a specified maximum number of times into an array of substrings at the positions defined by regular expression.

splitMaxTimesStartAtOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> count:int -> startAt:int -> input:string -> string array

Splits input string, begining at start position, a specified maximum number of times into an array of substrings at the positions defined by regular expression with Regex options.

splitOpt (...)
Signature: regularExpression:string -> regexOptions:RegexOptions -> input:string -> string array

Splits input string into an array of substrings at the positions defined by regular expression with Regex options.

Fork me on GitHub