text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>Capture Groups
</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="Composable F# regular expressions."/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

Capture Groups

FsGroup

FsGroup provides the functionality in the System.Text.RegularExpressions.Group Class, but returning arrays of objects instead of special collections and makes the group name a property.

anonymous groups

 1:
 2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:

let pattern = @"(\b(\w+?)[,:;]?\s?)+[?.!]"
let input = "This is one sentence. This is a second sentence."

let m = FsRegEx.firstMatch pattern input
printfn "Match: %s" m.Value

m.Groups()
|> Array.iteri (fun i g ->
    printfn "   Group %i: '%s'" i g.Value
    g.Captures()
    |> Array.iteri (fun i c ->
        printfn "      Capture %i: '%s'" i c.Value
        )
    )

// Match: This is one sentence.
//    Group 0: 'This is one sentence.'
//        Capture 0: 'This is one sentence.'
//    Group 1: 'sentence'
//        Capture 0: 'This '
//        Capture 1: 'is '
//        Capture 2: 'one '
//        Capture 3: 'sentence'
//    Group 2: 'sentence'
//        Capture 0: 'This'
//        Capture 1: 'is'
//        Capture 2: 'one'
//        Capture 3: 'sentence'

named groups

 1:
 2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
10:
11:
12:
13:
14:
15:
16:
17:

let pattern' = @"\b(?<FirstWord>\w+)\s?((\w+)\s)*(?<LastWord>\w+)?(?<Punctuation>\p{Po})"
let input' = "The cow jumped over the moon."

let m' = FsRegEx.firstMatch pattern' input'

printfn "Named Groups:"

m'.Groups()
|> Array.iter (fun g -> printfn "   %s: '%s'" g.Name g.Value)

// Named Groups:
//    0: 'The cow jumped over the moon.'
//    1: 'the '
//    2: 'the'
//    FirstWord: 'The'
//    LastWord: 'moon'
//    Punctuation: '.'

capturing groups

 1:
 2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:

let regExpr = @"\b(\w+?)([\u00AE\u2122])"

let matches =
    "Microsoft® Office Professional Edition combines several office " +
        "productivity products, including Word, Excel®, Access®, Outlook®, " +
        "PowerPoint®, and several others. Some guidelines for creating " +
        "corporate documents using these productivity tools are available " +
        "from the documents created using Silverlight™ on the corporate " +
        "intranet site."
    |> FsRegEx.matches regExpr

matches
|> Array.iter (fun m ->
    let groups = m.Groups()
    printfn "%s: %s" groups.[2].Value groups.[1].Value)

printfn ""
printfn "Found %i trademarks or registered trademarks." matches.Length

// ®: Microsoft
// ®: Excel
// ®: Access
// ®: Outlook
// ®: PowerPoint
// ™: Silverlight
//
// Found 6 trademarks or registered trademarks.

group numbers and names

 1:
 2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:

open System

let pattern'' = @"\b((?<word>\w+)\s*)+(?<end>[.?!])"
let input'' = "This is a sentence. This is a second sentence."

let groupNumbers' = FsRegEx.groupNumbers pattern''
let groupNames = FsRegEx.groupNames pattern''

let m'' = FsRegEx.firstMatch pattern'' input''

printfn "Match: %s" m''.Value

Array.zip groupNumbers' groupNames
|> Array.iter (fun (n, name) ->
    let isNumber, _ = Int32.TryParse(name)
    printfn "   Group %i%s: '%s'"
        n
        (if (not isNumber) then
            " (" + name + ")"
         else String.Empty)
        (m'.Groups()).[n].Value
    )

// Match: This is a sentence.
//    Group 0: 'This is a sentence.'
//    Group 1: 'sentence'
//    Group 2 (word): 'sentence'
//    Group 3 (end): '.'

val pattern : string

val input : string

val m : obj

val printfn : format:Printf.TextWriterFormat<'T> -> 'T

module Array

from Microsoft.FSharp.Collections

val iteri : action:(int -> 'T -> unit) -> array:'T [] -> unit

val i : int

val g : obj

val c : obj

val pattern' : string

val input' : string

val m' : obj

val iter : action:('T -> unit) -> array:'T [] -> unit

val regExpr : string

val matches : obj []

val groups : obj

property System.Array.Length: int

namespace System

val pattern'' : string

val input'' : string

val groupNumbers' : int []

val groupNames : string []

val m'' : obj

type Array =
  member Clone : unit -> obj
  member CopyTo : array:Array * index:int -> unit + 1 overload
  member GetEnumerator : unit -> IEnumerator
  member GetLength : dimension:int -> int
  member GetLongLength : dimension:int -> int64
  member GetLowerBound : dimension:int -> int
  member GetUpperBound : dimension:int -> int
  member GetValue : [<ParamArray>] indices:int[] -> obj + 7 overloads
  member Initialize : unit -> unit
  member IsFixedSize : bool
  ...

val zip : array1:'T1 [] -> array2:'T2 [] -> ('T1 * 'T2) []

val n : int

val name : string

val isNumber : bool

type Int32 =
  struct
    member CompareTo : value:obj -> int + 1 overload
    member Equals : obj:obj -> bool + 1 overload
    member GetHashCode : unit -> int
    member GetTypeCode : unit -> TypeCode
    member ToString : unit -> string + 3 overloads
    static val MaxValue : int
    static val MinValue : int
    static member Parse : s:string -> int + 3 overloads
    static member TryParse : s:string * result:int -> bool + 1 overload
  end

Int32.TryParse(s: string, result: byref<int>) : bool
Int32.TryParse(s: string, style: Globalization.NumberStyles, provider: IFormatProvider, result: byref<int>) : bool

val not : value:bool -> bool

Multiple items
type String =
  new : value:char -> string + 7 overloads
  member Chars : int -> char
  member Clone : unit -> obj
  member CompareTo : value:obj -> int + 1 overload
  member Contains : value:string -> bool
  member CopyTo : sourceIndex:int * destination:char[] * destinationIndex:int * count:int -> unit
  member EndsWith : value:string -> bool + 2 overloads
  member Equals : obj:obj -> bool + 2 overloads
  member GetEnumerator : unit -> CharEnumerator
  member GetHashCode : unit -> int
  ...

--------------------
String(value: nativeptr<char>) : String
String(value: nativeptr<sbyte>) : String
String(value: char []) : String
String(c: char, count: int) : String
String(value: nativeptr<char>, startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int) : String
String(value: char [], startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: Text.Encoding) : String

field string.Empty: string

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>Capturing
</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="Composable F# regular expressions."/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

Capturing

Capturing is a shortcut through matching to a named group or the group's captured value.

capture

1:
2:
3:
4:
5:
6:
7:
8:
9:

open FsRegEx

let groupNumberRegExp = @"COD(?<GroupNumber>[0-9]{3})END"
let groupNumberName = "GroupNumber"

capture groupNumberRegExp groupNumberName "COD123END"
|> printfn "%s"

// 123

capture group

1:
2:
3:
4:
5:

let group = captureGroup groupNumberRegExp groupNumberName "COD123END"

printfn "%s" group.Value

// 123

val groupNumberRegExp : string

val groupNumberName : string

val printfn : format:Printf.TextWriterFormat<'T> -> 'T

val group : obj

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial

repo_name: jackfoxy/FsRegEx

repo_language: F#

mime_type: text/plain


text:
@import url(https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Open+Sans:400,600,700);

/*--------------------------------------------------------------------------
  Formatting for F# code snippets
/*--------------------------------------------------------------------------*/

/* identifier */
span.i { color:#000000; }
/* string */
span.s { color:#a31515; }
/* keywords */
span.k { color:#0000ff; }
/* comment */
span.c { color:#008000; }
/* operators */
span.o { color:#000000; }
/* numbers */
span.n { color:#000000; }
/* line number */
span.l { color:#96c2cd; }
/* type or module */
span.t { color:#2b91af; }
/* function */
span.f { color:#0000a0; }
/* DU case or active pattern */
span.p { color:#800080; }
/* mutable var or ref cell */
span.v { color:#000000; font-weight: bold; }
/* printf formatters */
span.pf { color:#2b91af; }
/* escaped chars */
span.e { color:#ff0080; }
/* mutable var or ref cell */

/* inactive code */
span.inactive { color:#808080; }
/* preprocessor */
span.prep { color:#0000ff; }
/* fsi output */
span.fsi { color:#808080; }

/* omitted */
span.omitted {
	background:#3c4e52;
  border-radius:5px;
	color:#808080;
	padding:0px 0px 1px 0px;
}
/* tool tip */
div.tip {
	background:#e5e5e5;
  border-radius:4px;
  font:9pt 'Droid Sans', arial, sans-serif;
	padding:6px 8px 6px 8px;
	display:none;
  color:#000000;
  pointer-events:none;
}
table.pre pre {
  padding:0px;
  margin:0px;
  border:none;
}
table.pre, pre.fssnip, pre {
  line-height:13pt;
  border:1px solid #d8d8d8;
  border-collapse:separate;
  white-space:pre;
  font: 10pt consolas,monospace;
  width:90%;
  margin:10px 20px 20px 20px;
  background-color:#fdfdfd;
  padding:10px;
  border-radius:5px;
  color:#000000;
  max-width: none;
}
pre.fssnip code {
  font: 9pt 'Droid Sans Mono',consolas,monospace;
}
table.pre pre {
  padding:0px;
  margin:0px;
  border-radius:0px;
  width: 100%;
}
table.pre td {
  padding:0px;
  white-space:normal;
  margin:0px;
}
table.pre td.lines {
  width:30px;
}

/*--------------------------------------------------------------------------
  Formatting for page & standard document content
/*--------------------------------------------------------------------------*/

body {
  font-family: 'Open Sans', serif;
  padding-top: 0px;
  padding-bottom: 40px;
}

pre {
    word-wrap: inherit;
}

/* Format the heading - nicer spacing etc. */
.masthead {
  overflow: hidden;
}
.masthead .muted a {
  text-decoration:none;
  color:#999999;
}
.masthead ul, .masthead li {
  margin-bottom:0px;
}
.masthead .nav li {
  margin-top: 15px;
  font-size:110%;
}
.masthead h3 {
  margin-bottom:5px;
  font-size:170%;
}
hr {
  margin:0px 0px 20px 0px;
}

/* Make table headings and td.title bold */
td.title, thead {
  font-weight:bold;
}

/* Format the right-side menu */
#menu {
  margin-top:50px;
  font-size:11pt;
  padding-left:20px;
}

#menu .nav-header {
  font-size:12pt;
  color:#606060;
  margin-top:20px;
}

#menu li {
  line-height:25px;
}

/* Change font sizes for headings etc. */
#main h1 { font-size: 26pt; margin:10px 0px 15px 0px; font-weight:400; }
#main h2 { font-size: 20pt; margin:20px 0px 0px 0px; font-weight:400; }
#main h3 { font-size: 14pt; margin:15px 0px 0px 0px; font-weight:600; }
#main p  { font-size: 11pt; margin:5px 0px 15px 0px; }
#main ul { font-size: 11pt; margin-top:10px; }
#main li { font-size: 11pt; margin: 5px 0px 5px 0px; }
#main strong { font-weight:700; }

/*--------------------------------------------------------------------------
  Formatting for API reference
/*--------------------------------------------------------------------------*/

.type-list .type-name, .module-list .module-name {
  width:25%;
  font-weight:bold;
}
.member-list .member-name {
  width:35%;
}
#main .xmldoc h2 {
  font-size:14pt;
  margin:10px 0px 0px 0px;
}
#main .xmldoc h3 {
  font-size:12pt;
  margin:10px 0px 0px 0px;
}
.github-link {
  float:right;
  text-decoration:none;
}
.github-link img {
  border-style:none;
  margin-left:10px;
}
.github-link .hover { display:none; }
.github-link:hover .hover { display:block; }
.github-link .normal { display: block; }
.github-link:hover .normal { display: none; }

/*--------------------------------------------------------------------------
  Links
/*--------------------------------------------------------------------------*/

h1 a, h1 a:hover, h1 a:focus,
h2 a, h2 a:hover, h2 a:focus,
h3 a, h3 a:hover, h3 a:focus,
h4 a, h4 a:hover, h4 a:focus,
h5 a, h5 a:hover, h5 a:focus,
h6 a, h6 a:hover, h6 a:focus { color : inherit; text-decoration : inherit; outline:none }

/*--------------------------------------------------------------------------
  Additional formatting for the homepage
/*--------------------------------------------------------------------------*/

#nuget {
  margin-top:20px;
  font-size: 11pt;
  padding:20px;
}

#nuget pre {
  font-size:11pt;
  -moz-border-radius: 0px;
  -webkit-border-radius: 0px;
  border-radius: 0px;
  background: #404040;
  border-style:none;
  color: #e0e0e0;
  margin-top:15px;
}


text:
@import url(https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Open+Sans:400,600,700);

/*--------------------------------------------------------------------------
  Formatting for F# code snippets
/*--------------------------------------------------------------------------*/

/* strings --- and stlyes for other string related formats */
span.s { color:#E0E268; }
/* printf formatters */
span.pf { color:#E0C57F; }
/* escaped chars */
span.e { color:#EA8675; }

/* identifiers --- and styles for more specific identifier types */
span.id { color:#d1d1d1; }
/* module */
span.m { color:#43AEC6; }
/* reference type */
span.rt { color:#43AEC6; }
/* value type */
span.vt { color:#43AEC6; }
/* interface */
span.if{ color:#43AEC6; }
/* type argument */
span.ta { color:#43AEC6; }
/* disposable */
span.d { color:#43AEC6; }
/* property */
span.prop { color:#43AEC6; }
/* punctuation */
span.p { color:#43AEC6; }
/* function */
span.f { color:#e1e1e1; }
/* active pattern */
span.pat { color:#4ec9b0; }
/* union case */
span.u { color:#4ec9b0; }
/* enumeration */
span.e { color:#4ec9b0; }
/* keywords */
span.k { color:#FAB11D; }
/* comment */
span.c { color:#808080; }
/* operators */
span.o { color:#af75c1; }
/* numbers */
span.n { color:#96C71D; }
/* line number */
span.l { color:#80b0b0; }
/* mutable var or ref cell */
span.v { color:#d1d1d1; font-weight: bold; }
/* inactive code */
span.inactive { color:#808080; }
/* preprocessor */
span.prep { color:#af75c1; }
/* fsi output */
span.fsi { color:#808080; }

/* omitted */
span.omitted {
	background:#3c4e52;
  border-radius:5px;
	color:#808080;
	padding:0px 0px 1px 0px;
}
/* tool tip */
div.tip {
	background:#475b5f;
  border-radius:4px;
  font:11pt 'Droid Sans', arial, sans-serif;
	padding:6px 8px 6px 8px;
	display:none;
  color:#d1d1d1;
  pointer-events:none;
}
table.pre pre {
  padding:0px;
  margin:0px;
  border:none;
}
table.pre, pre.fssnip, pre {
  line-height:13pt;
  border:1px solid #d8d8d8;
  border-collapse:separate;
  white-space:pre;
  font: 9pt 'Droid Sans Mono',consolas,monospace;
  width:90%;
  margin:10px 20px 20px 20px;
  background-color:#212d30;
  padding:10px;
  border-radius:5px;
  color:#d1d1d1;
  max-width: none;
}
pre.fssnip code {
  font: 9pt 'Droid Sans Mono',consolas,monospace;
}
table.pre pre {
  padding:0px;
  margin:0px;
  border-radius:0px;
  width: 100%;
}
table.pre td {
  padding:0px;
  white-space:normal;
  margin:0px;
}
table.pre td.lines {
  width:30px;
}

/*--------------------------------------------------------------------------
  Formatting for page & standard document content
/*--------------------------------------------------------------------------*/

body {
  font-family: 'Open Sans', serif;
  padding-top: 0px;
  padding-bottom: 40px;
}

pre {
    word-wrap: inherit;
}

/* Format the heading - nicer spacing etc. */
.masthead {
  overflow: hidden;
}
.masthead .muted a {
  text-decoration:none;
  color:#999999;
}
.masthead ul, .masthead li {
  margin-bottom:0px;
}
.masthead .nav li {
  margin-top: 15px;
  font-size:110%;
}
.masthead h3 {
  margin-bottom:5px;
  font-size:170%;
}
hr {
  margin:0px 0px 20px 0px;
}

/* Make table headings and td.title bold */
td.title, thead {
  font-weight:bold;
}

/* Format the right-side menu */
#menu {
  margin-top:50px;
  font-size:11pt;
  padding-left:20px;
}

#menu .nav-header {
  font-size:12pt;
  color:#606060;
  margin-top:20px;
}

#menu li {
  line-height:25px;
}

/* Change font sizes for headings etc. */
#main h1 { font-size: 26pt; margin:10px 0px 15px 0px; font-weight:400; }
#main h2 { font-size: 20pt; margin:20px 0px 0px 0px; font-weight:400; }
#main h3 { font-size: 14pt; margin:15px 0px 0px 0px; font-weight:600; }
#main p  { font-size: 11pt; margin:5px 0px 15px 0px; }
#main ul { font-size: 11pt; margin-top:10px; }
#main li { font-size: 11pt; margin: 5px 0px 5px 0px; }
#main strong { font-weight:700; }

/*--------------------------------------------------------------------------
  Formatting for API reference
/*--------------------------------------------------------------------------*/

.type-list .type-name, .module-list .module-name {
  width:25%;
  font-weight:bold;
}
.member-list .member-name {
  width:35%;
}
#main .xmldoc h2 {
  font-size:14pt;
  margin:10px 0px 0px 0px;
}
#main .xmldoc h3 {
  font-size:12pt;
  margin:10px 0px 0px 0px;
}
.github-link {
  float:right;
  text-decoration:none;
}
.github-link img {
  border-style:none;
  margin-left:10px;
}
.github-link .hover { display:none; }
.github-link:hover .hover { display:block; }
.github-link .normal { display: block; }
.github-link:hover .normal { display: none; }

/*--------------------------------------------------------------------------
  Links
/*--------------------------------------------------------------------------*/

h1 a, h1 a:hover, h1 a:focus,
h2 a, h2 a:hover, h2 a:focus,
h3 a, h3 a:hover, h3 a:focus,
h4 a, h4 a:hover, h4 a:focus,
h5 a, h5 a:hover, h5 a:focus,
h6 a, h6 a:hover, h6 a:focus { color : inherit; text-decoration : inherit; outline:none }

/*--------------------------------------------------------------------------
  Additional formatting for the homepage
/*--------------------------------------------------------------------------*/

#nuget {
  margin-top:20px;
  font-size: 11pt;
  padding:20px;
}

#nuget pre {
  font-size:11pt;
  -moz-border-radius: 0px;
  -webkit-border-radius: 0px;
  border-radius: 0px;
  background: #404040;
  border-style:none;
  color: #e0e0e0;
  margin-top:15px;
}


text:
var currentTip = null;
var currentTipElement = null;

function hideTip(evt, name, unique) {
    var el = document.getElementById(name);
    el.style.display = "none";
    currentTip = null;
}

function findPos(obj) {
    // no idea why, but it behaves differently in webbrowser component
    if (window.location.search == "?inapp")
        return [obj.offsetLeft + 10, obj.offsetTop + 30];

    var curleft = 0;
    var curtop = obj.offsetHeight;
    while (obj) {
        curleft += obj.offsetLeft;
        curtop += obj.offsetTop;
        obj = obj.offsetParent;
    };
    return [curleft, curtop];
}

function hideUsingEsc(e) {
    if (!e) { e = event; }
    hideTip(e, currentTipElement, currentTip);
}

function showTip(evt, name, unique, owner) {
    document.onkeydown = hideUsingEsc;
    if (currentTip == unique) return;
    currentTip = unique;
    currentTipElement = name;

    var pos = findPos(owner ? owner : (evt.srcElement ? evt.srcElement : evt.target));
    var posx = pos[0];
    var posy = pos[1];

    var el = document.getElementById(name);
    var parent = (document.documentElement == null) ? document.body : document.documentElement;
    el.style.position = "absolute";
    el.style.left = posx + "px";
    el.style.top = posy + "px";
    el.style.display = "block";
}


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>UnicodeGeneralCategory - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

UnicodeGeneralCategory

    Namespace: global

        Parent Module: Unicode

Enum Unicode defined general categories

Union Cases

Union Case	Description

            ControlAll

            Signature:

All control characters. This includes the OtherControl, OtherFormat, OtherSurrogate, OtherPrivateUse, and OtherNotAssigned categories; C

            Letter

            Signature:

All letter characters. This includes the LetterUppercase, LetterLowercase, LetterTitlecase, LetterModifier, and LetterOther characters; L

            LetterLowercase

            Signature:

Letter, Lowercase; Ll

            LetterModifier

            Signature:

Letter, Modifier; Lm

            LetterOther

            Signature:

Letter, Other; Lo

            LetterTitlecase

            Signature:

Letter, Titlecase; Lt

            LetterUppercase

            Signature:

Letter, Uppercase; Lu

            Mark

            Signature:

All diacritic marks. This includes the MarkNonspacing, MarkSpacingCombining, and MarkEnclosing categories; M

            MarkEnclosing

            Signature:

Mark, Enclosing; Me

            MarkNonspacing

            Signature:

Mark, Nonspacing; Mn

            MarkSpacingCombining

            Signature:

Mark, Spacing Combining; Mc

            NumberALL

            Signature:

All numbers. This includes the Nd, Nl, and No categories; N

            NumberDecimalDigit

            Signature:

Number, Decimal Digit; Nd

            NumberLetter

            Signature:

Number, Letter; Nl

            NumberOther

            Signature:

Number, Other; No

            OtherControl

            Signature:

Other, Control; Cc

            OtherFormat

            Signature:

Other, Format; Cf

            OtherNotAssigned

            Signature:

Other, Not Assigned (no characters have this property); Cn

            OtherPrivateUse

            Signature:

Other, Private Use; Co

            OtherSurrogate

            Signature:

Other, Surrogate; Cs

            Punctuation

            Signature:

All punctuation characters. This includes the PunctuationConnector, PunctuationDash, PunctuationOpen, PunctuationClose, PunctuationInitial, PunctuationFinal, and PunctuationOther categories; P

            PunctuationClose

            Signature:

Punctuation, Close; Pe

            PunctuationConnector

            Signature:

Punctuation, Connector; Pc

            PunctuationDash

            Signature:

Punctuation, Dash; Pd

            PunctuationFinal

            Signature:

Punctuation, Final quote (may behave like Ps or Pe depending on usage); Pf

            PunctuationInitial

            Signature:

Punctuation, Initial quote (may behave like Ps or Pe depending on usage); Pi

            PunctuationOpen

            Signature:

Punctuation, Open; Ps

            PunctuationOther

            Signature:

Punctuation, Other; Po

            Separator

            Signature:

All separator characters. This includes the SeparatorSpace, SeparatorLine, and SeparatorLine categories; Z

            SeparatorLine

            Signature:

Separator, Line; Zl

            SeparatorParagraph

            Signature:

Separator, Paragraph; Zp

            SeparatorSpace

            Signature:

Separator, Space; Zs

            Symbol

            Signature:

All symbols. This includes the SymbolMath, SymbolCurrency, SymbolModifier, and SymbolOther categories; S

            SymbolCurrency

            Signature:

Symbol, Currency; Sc

            SymbolMath

            Signature:

Symbol, Math; Sm

            SymbolModifier

            Signature:

Symbol, Modifier; Sk

            SymbolOther

            Signature:

Symbol, Other; So

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>FsRegEx - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

FsRegEx

    Namespace: global

        Parent Module: FsRegEx

Composable immutable wrapping type for System.Text.RegularExpressions.Regex.

Constructors

Constructor	Description

            new(...)

            Signature: (regularExpression:string * regexOptions:RegexOptions * matchTimeout:TimeSpan) -> FsRegEx

CompiledName: .ctor

            new(regularExpression, regexOptions)

            Signature: (regularExpression:string * regexOptions:RegexOptions) -> FsRegEx

CompiledName: .ctor

            new(regularExpression)

            Signature: regularExpression:string -> FsRegEx

CompiledName: .ctor

            new(regexOptions)

            Signature: regexOptions:RegexOptions -> FsRegEx

CompiledName: .ctor

            new()

            Signature: unit -> FsRegEx

CompiledName: .ctor

Instance members

Instance member	Description

            Capture(input arg2)

            Signature: input:string -> string -> string

Match and select groupname value.

            GroupNameFromNumber(n)

            Signature: n:int -> string option

Gets the group name that corresponds to the specified group number.

            GroupNames()

            Signature: unit -> string array

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

            GroupNumberFromName(groupName)

            Signature: groupName:string -> int option

Returns the group number that corresponds to the specified group name.

            GroupNumbers()

            Signature: unit -> int array

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

            IsMatch(input, startAt)

            Signature: (input:string * startAt:int) -> bool

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

            IsMatch(input)

            Signature: input:string -> bool

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

            Match(input, startAt, length)

            Signature: (input:string * startAt:int * length:int) -> FsMatch

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

            Match(input, startAt)

            Signature: (input:string * startAt:int) -> FsMatch

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

            Match(input)

            Signature: input:string -> FsMatch

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

            Matches(input, startAt)

            Signature: (input:string * startAt:int) -> FsMatch []

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

            Matches(input)

            Signature: input:string -> FsMatch []

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

            MatchTimeout

            Signature: TimeSpan

Gets the time-out interval of the current instance.

CompiledName: get_MatchTimeout

            Regex

            Signature: Regex

The underlying System.Text.RegularExpressions.Regex

CompiledName: get_Regex

            RegexOptions

            Signature: RegexOptions

Enumerated values to use to set regular expression options.

CompiledName: get_RegexOptions

            Replace(input, evalutor, count, startAt)

            Signature: (input:string * evalutor:MatchEvaluator * count:int * startAt:int) -> 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.

            Replace(...)

            Signature: (input:string * replacement:string * count:int * startAt:int) -> string

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

            Replace(input, evalutor, count)

            Signature: (input:string * evalutor:MatchEvaluator * count:int) -> string

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

            Replace(input, replacement, count)

            Signature: (input:string * replacement:string * count:int) -> string

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

            Replace(input, evalutor)

            Signature: (input:string * evalutor:MatchEvaluator) -> string

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

            Replace(input, replacement)

            Signature: (input:string * replacement:string) -> string

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

            RightToLeft

            Signature: bool

Indicates whether the regular expression searches from right to left.

CompiledName: get_RightToLeft

            Split(input, count, startAt)

            Signature: (input:string * count:int * startAt:int) -> 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.

            Split(input, count)

            Signature: (input:string * count:int) -> string array

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

            Split(input)

            Signature: input:string -> string array

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

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>Namespaces - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

FsRegEx

global Namespace

Module	Description

            CommonFsRegEx

Common regular expressions in FsRegEx type.

            FsRegEx

Types and functions supporting composable F# regular expressions.

            VerbalExpressions

Functions supporting composable verbal expression natural language regular expressions.

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>CommonFsRegEx - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

CommonFsRegEx

  Namespace: global

Common regular expressions in FsRegEx type.

Functions and values

Function or value	Description

            Email

            Signature: FsRegEx

Valid email string. (Note that RE email validation is ill-advised.)

            Url

            Signature: FsRegEx

Valid Url string.

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>FsMatch - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

FsMatch

    Namespace: global

        Parent Module: FsRegEx

Composable wrapping type for System.Text.RegularExpressions.Match. Represents the results from a single regular expression match.

Constructors

Constructor	Description

            new(regex, fsMatch)

            Signature: (regex:Regex * fsMatch:Match) -> FsMatch

CompiledName: .ctor

Instance members

Instance member	Description

            Captures()

            Signature: unit -> Capture []

Array of all the captures matched by the capturing group, in innermost-leftmost-first order (or innermost-rightmost-first order if the regular expression is modified with the RegexOptions.RightToLeft option). The collection may have zero or more items.

            Groups()

            Signature: unit -> FsGroup []

Capturing groups matched by regular expression.

            Index

            Signature: int

The position in the original string where the first character of the captured substring is found.

CompiledName: get_Index

            Length

            Signature: int

Returns the length of the captured substring.

CompiledName: get_Length

            Match

            Signature: Match

Wrapped System.Text.RegularExpressions.Match. Represents the results from a single regular expression match.

CompiledName: get_Match

            Result(replacement)

            Signature: replacement:string -> string

Returns the expansion of the specified replacement pattern.

            Success

            Signature: bool

Returns a value indicating whether the match is successful.

CompiledName: get_Success

            Value

            Signature: string

Returns the captured substring from the input string.

CompiledName: get_Value

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>SupportedNamedBlock - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

SupportedNamedBlock

    Namespace: global

        Parent Module: Unicode

Enum .NET Framework named Unicode blocks

Union Cases

Union Case	Description

            IsAlphabeticPresentationForms

            Signature:

FB00 - FB4F

            IsArabic

            Signature:

0600 - 06FF

            IsArabicPresentationFormsA

            Signature:

FB50 - FDFF

            IsArabicPresentationFormsB

            Signature:

FE70 - FEFF

            IsArmenian

            Signature:

0530 - 058F

            IsArrows

            Signature:

2190 - 21FF

            IsBasicLatin

            Signature:

0000 - 007F

            IsBengali

            Signature:

0980 - 09FF

            IsBlockElements

            Signature:

2580 - 259F

            IsBopomofo

            Signature:

3100 - 312F

            IsBopomofoExtended

            Signature:

31A0 - 31BF

            IsBoxDrawing

            Signature:

2500 - 257F

            IsBraillePatterns

            Signature:

2800 - 28FF

            IsBuhid

            Signature:

1740 - 175F

            IsCherokee

            Signature:

13A0 - 13FF

            IsCJKCompatibility

            Signature:

3300 - 33FF

            IsCJKCompatibilityForms

            Signature:

FE30 - FE4F

            IsCJKCompatibilityIdeographs

            Signature:

F900 - FAFF

            IsCJKRadicalsSupplement

            Signature:

2E80 - 2EFF

            IsCJKSymbolsandPunctuation

            Signature:

3000 - 303F

            IsCJKUnifiedIdeographs

            Signature:

4E00 - 9FFF

            IsCJKUnifiedIdeographsExtensionA

            Signature:

3400 - 4DBF

            IsCombiningDiacriticalMarks

            Signature:

0300 - 036F

            IsCombiningDiacriticalMarksforSymbols

            Signature:

20D0 - 20FF

            IsCombiningHalfMarks

            Signature:

FE20 - FE2F

            IsCombiningMarksforSymbols

            Signature:

20D0 - 20FF

            IsControlPictures

            Signature:

2400 - 243F

            IsCurrencySymbols

            Signature:

20A0 - 20CF

            IsCyrillic

            Signature:

0400 - 04FF

            IsCyrillicSupplement

            Signature:

0500 - 052F

            IsDevanagari

            Signature:

0900 - 097F

            IsDingbats

            Signature:

2700 - 27BF

            IsEnclosedAlphanumerics

            Signature:

2460 - 24FF

            IsEnclosedCJKLettersandMonths

            Signature:

3200 - 32FF

            IsEthiopic

            Signature:

1200 - 137F

            IsGeneralPunctuation

            Signature:

2000 - 206F

            IsGeometricShapes

            Signature:

25A0 - 25FF

            IsGeorgian

            Signature:

10A0 - 10FF

            IsGreek

            Signature:

0370 - 03FF

            IsGreekandCoptic

            Signature:

0370 - 03FF

            IsGreekExtended

            Signature:

1F00 - 1FFF

            IsGujarati

            Signature:

0A80 - 0AFF

            IsGurmukhi

            Signature:

0A00 - 0A7F

            IsHalfwidthandFullwidthForms

            Signature:

FF00 - FFEF

            IsHangulCompatibilityJamo

            Signature:

3130 - 318F

            IsHangulJamo

            Signature:

1100 - 11FF

            IsHangulSyllables

            Signature:

AC00 - D7AF

            IsHanunoo

            Signature:

1720 - 173F

            IsHebrew

            Signature:

0590 - 05FF

            IsHighPrivateUseSurrogates

            Signature:

DB80 - DBFF

            IsHighSurrogates

            Signature:

D800 - DB7F

            IsHiragana

            Signature:

3040 - 309F

            IsIdeographicDescriptionCharacters

            Signature:

2FF0 - 2FFF

            IsIPAExtensions

            Signature:

0250 - 02AF

            IsKanbun

            Signature:

3190 - 319F

            IsKangxiRadicals

            Signature:

2F00 - 2FDF

            IsKannada

            Signature:

0C80 - 0CFF

            IsKatakana

            Signature:

30A0 - 30FF

            IsKatakanaPhoneticExtensions

            Signature:

31F0 - 31FF

            IsKhmer

            Signature:

1780 - 17FF

            IsKhmerSymbols

            Signature:

19E0 - 19FF

            IsLao

            Signature:

0E80 - 0EFF

            IsLatin1Supplement

            Signature:

0080 - 00FF

            IsLatinExtendedA

            Signature:

0100 - 017F

            IsLatinExtendedAdditional

            Signature:

1E00 - 1EFF

            IsLatinExtendedB

            Signature:

0180 - 024F

            IsLetterlikeSymbols

            Signature:

2100 - 214F

            IsLimbu

            Signature:

1900 - 194F

            IsLowSurrogates

            Signature:

DC00 - DFFF

            IsMalayalam

            Signature:

0D00 - 0D7F

            IsMathematicalOperators

            Signature:

2200 - 22FF

            IsMiscellaneousMathematicalSymbolsA

            Signature:

27C0 - 27EF

            IsMiscellaneousMathematicalSymbolsB

            Signature:

2980 - 29FF

            IsMiscellaneousSymbols

            Signature:

2600 - 26FF

            IsMiscellaneousSymbolsandArrows

            Signature:

2B00 - 2BFF

            IsMiscellaneousTechnical

            Signature:

2300 - 23FF

            IsMongolian

            Signature:

1800 - 18AF

            IsMyanmar

            Signature:

1000 - 109F

            IsNumberForms

            Signature:

2150 - 218F

            IsOgham

            Signature:

1680 - 169F

            IsOpticalCharacterRecognition

            Signature:

2440 - 245F

            IsOriya

            Signature:

0B00 - 0B7F

            IsPhoneticExtensions

            Signature:

1D00 - 1D7F

            IsPrivateUse

            Signature:

E000 - F8FF

            IsRunic

            Signature:

16A0 - 16FF

            IsSinhala

            Signature:

0D80 - 0DFF

            IsSmallFormVariants

            Signature:

FE50 - FE6F

            IsSpacingModifierLetters

            Signature:

02B0 - 02FF

            IsSpecials

            Signature:

FFF0 - FFFF

            IsSuperscriptsandSubscripts

            Signature:

2070 - 209F

            IsSupplementalArrowsA

            Signature:

27F0 - 27FF

            IsSupplementalArrowsB

            Signature:

2900 - 297F

            IsSupplementalMathematicalOperators

            Signature:

2A00 - 2AFF

            IsSyriac

            Signature:

0700 - 074F

            IsTagalog

            Signature:

1700 - 171F

            IsTagbanwa

            Signature:

1760 - 177F

            IsTaiLe

            Signature:

1950 - 197F

            IsTamil

            Signature:

0B80 - 0BFF

            IsTelugu

            Signature:

0C00 - 0C7F

            IsThaana

            Signature:

0780 - 07BF

            IsThai

            Signature:

0E00 - 0E7F

            IsTibetan

            Signature:

0F00 - 0FFF

            IsUnifiedCanadianAboriginalSyllabics

            Signature:

1400 - 167F

            IsVariationSelectors

            Signature:

FE00 - FE0F

            IsYijingHexagramSymbols

            Signature:

4DC0 - 4DFF

            IsYiRadicals

            Signature:

A490 - A4CF

            IsYiSyllables

            Signature:

A000 - A48F

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>VerbalExpressions - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

VerbalExpressions

  Namespace: global

Functions supporting composable verbal expression natural language regular expressions.

Functions and values

Function or value	Description

            add value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

Append unescaped literal expression to the expression.

            any value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

Same as anyOf.

            anyOf value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

Matches any single character included in the specified set of escaped characters; [value]

            anything fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Zero or more of any character; (.*)

            anythingBut value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

Zero or more of any character except escaped character(s); ([^value]*)

            backReference ordinal fsRegEx

            Signature: ordinal:int -> fsRegEx:FsRegEx -> FsRegEx

Refers to nth occurence of capturing groups; \ordinal

            beginCapture fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Begin capture group; (

            beginCaptureNamed groupName fsRegEx

            Signature: groupName:string -> fsRegEx:FsRegEx -> FsRegEx

Begin named capture group ;(?<groupName>

            br fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Same as lineBreak; \n

            capture input groupName fsRegEx

            Signature: input:string -> groupName:string -> fsRegEx:FsRegEx -> string

Match and select groupname value.

            digit fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches any decimal digit; \d

            endCapture fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

End capture group; )

            endOfLine fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Mark the expression to end at the last character of the line; $

            exists f fsRegEx

            Signature: f:(FsRegEx -> bool) -> fsRegEx:FsRegEx -> bool

Evaluates the boolean function on the FsRegEx

            find value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

Append escaped literal expression to the expression. (Same as then'.)

            firstMatch input fsRegEx

            Signature: input:string -> fsRegEx:FsRegEx -> FsMatch

Searches the specified input string for the first occurrence of the FsRegEx.

            fold f state fsRegEx

            Signature: f:('State -> FsRegEx -> 'State) -> state:'State -> fsRegEx:FsRegEx -> 'State

                          Type parameters: 'State

Applies a function to a FsRegEx and a state returning a state

            foldBack f fsRegEx state

            Signature: f:(FsRegEx -> 'State -> 'State) -> fsRegEx:FsRegEx -> state:'State -> 'State

                          Type parameters: 'State

Applies a function to a FsRegEx and a state returning a state

            fsRegExOrFsRegEx (...)

            Signature: regexOptions:RegexOptions -> fsRegEx:FsRegEx -> fsRegEx:FsRegEx -> FsRegEx

Return new FsRegEx of two FsRegExs or'ed.

            groupNames fsRegEx

            Signature: fsRegEx:FsRegEx -> string array

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

            groupNumbers fsRegEx

            Signature: fsRegEx:FsRegEx -> int array

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

            isMatch value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> bool

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

            isMatchAt value startAt fsRegEx

            Signature: value:string -> startAt:int -> fsRegEx:FsRegEx -> bool

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

            iter f fsRegEx

            Signature: f:(FsRegEx -> unit) -> fsRegEx:FsRegEx -> unit

Executes a function on a FsRegEx.

            lineBreak fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches universal line break expression; \n

            map f fsRegEx

            Signature: f:(FsRegEx -> FsRegEx) -> fsRegEx:FsRegEx -> FsRegEx

Transforms a FsRegEx  with a mapping function

            matchAt input startAt fsRegEx

            Signature: input:string -> startAt:int -> fsRegEx:FsRegEx -> FsMatch

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

            matchAtFor input startAt length fsRegEx

            Signature: input:string -> startAt:int -> length:int -> fsRegEx:FsRegEx -> FsMatch

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

            matches input fsRegEx

            Signature: input:string -> fsRegEx:FsRegEx -> FsMatch []

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

            matchesAt input startAt fsRegEx

            Signature: input:string -> startAt:int -> fsRegEx:FsRegEx -> FsMatch []

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

            maybe value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

Add escaped string to the expression that might appear once (or not); (value)?

            multiple value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

The escaped expression 1 or more times; (value)+

            multipleFsRegEx sourceFsRegEx fsRegEx

            Signature: sourceFsRegEx:FsRegEx -> fsRegEx:FsRegEx -> FsRegEx

The FsRegEx 1 or more times; (sourceFsRegEx)+

            namedBackReference groupname fsRegEx

            Signature: groupname:string -> fsRegEx:FsRegEx -> FsRegEx

Refers to named capturing group; \k<groupname>

            namedBlock name arg2

            Signature: name:SupportedNamedBlock -> FsRegEx -> FsRegEx

Matches any single character in the supported named block; \p{name}

            nonDigit fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches any nondigit; \D

            nonWhiteSpace fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches any non-white-space character; \S.

            nonWordCharacter fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches any nonword character; \W

            notNamedBlock name arg2

            Signature: name:SupportedNamedBlock -> FsRegEx -> FsRegEx

Matches any single character that is not in the supported named block; \P{name}

            notUnicodeCategory category arg2

            Signature: category:UnicodeGeneralCategory -> FsRegEx -> FsRegEx

Matches any single character that is not in the Unicode general category; \P{name}

            or' regularExpression fsRegEx

            Signature: regularExpression:string -> fsRegEx:FsRegEx -> FsRegEx

Or's the regular expression to the regular expression in a FsRegEx.

            range collection fsRegEx

            Signature: collection:seq<obj> -> fsRegEx:FsRegEx -> FsRegEx

Add expression to match a range (or multiple ranges), unescaped values.

            repeatBetweenPrevious n m arg3

            Signature: n:int -> m:int -> FsRegEx -> FsRegEx

Repeat previous number of times between n and m; {n,m}

            repeatPrevious n arg2

            Signature: n:int -> FsRegEx -> FsRegEx

Repeat previous exact number of times; {n}

            replace input replacement fsRegEx

            Signature: input:string -> replacement:string -> fsRegEx:FsRegEx -> string

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

            replaceByMatch input evalutor fsRegEx

            Signature: input:string -> evalutor:MatchEvaluator -> fsRegEx:FsRegEx -> string

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

            replaceByMatchMaxTimes (...)

            Signature: input:string -> evalutor:MatchEvaluator -> count:int -> fsRegEx:FsRegEx -> string

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

            replaceByMatchMaxTimesStartAt (...)

            Signature: input:string -> evalutor:MatchEvaluator -> count:int -> startAt:int -> fsRegEx:FsRegEx -> 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.

            replaceMaxTimes (...)

            Signature: input:string -> replacement:string -> count:int -> fsRegEx:FsRegEx -> string

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

            replaceMaxTimesStartAt (...)

            Signature: input:string -> replacement:string -> count:int -> startAt:int -> fsRegEx:FsRegEx -> string

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

            resetRegexOptions (...)

            Signature: newRegexOptions:RegexOptions option -> fsRegEx:FsRegEx -> FsRegEx

Return new FsRegEx with new RegExOptions.

            something fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

One or more of any character; (.+)

            somethingBut value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

One or more of any character except escaped character; ([^%s]+)

            split input fsRegEx

            Signature: input:string -> fsRegEx:FsRegEx -> string array

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

            splitMaxTimes input count fsRegEx

            Signature: input:string -> count:int -> fsRegEx:FsRegEx -> string array

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

            splitMaxTimesStartAt (...)

            Signature: input:string -> count:int -> startAt:int -> fsRegEx:FsRegEx -> 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.

            startOfLine fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Mark the expression to start at the beginning of the line; ^

            tab fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches a tab character; \t

            then' value fsRegEx

            Signature: value:string -> fsRegEx:FsRegEx -> FsRegEx

Append escaped literal expression to the expression. (Same as find.)

            toString fsRegEx

            Signature: fsRegEx:FsRegEx -> string

Value of regular expression.

            unicode nnnn arg2

            Signature: nnnn:string -> FsRegEx -> FsRegEx

Matches a Unicode character by using hexadecimal representation  (exactly four digits, as represented by nnnn); \unnnn

            unicodeCategory category arg2

            Signature: category:UnicodeGeneralCategory -> FsRegEx -> FsRegEx

Matches any single character in the Unicode general category; \p{name}

            whiteSpace fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches any white-space character; \s

            word fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Expression to match a word; \w+

            wordCharacter fsRegEx

            Signature: fsRegEx:FsRegEx -> FsRegEx

Matches any word character; \w

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>FsGroup - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

FsGroup

    Namespace: global

        Parent Module: FsRegEx

Composable wrapping type for System.Text.RegularExpressions.Group.

Constructors

Constructor	Description

            new(name, group)

            Signature: (name:string * group:Group) -> FsGroup

CompiledName: .ctor

Instance members

Instance member	Description

            Captures()

            Signature: unit -> Capture []

Array of all the captures matched by the capturing group, in innermost-leftmost-first order (or innermost-rightmost-first order if the regular expression is modified with the RegexOptions.RightToLeft option). The collection may have zero or more items.

            Group

            Signature: Group

The underlying System.Text.RegularExpressions.Group. Represents the results from a single capturing group.

CompiledName: get_Group

            Index

            Signature: int

The position in the original string where the first character of the captured substring is found.

CompiledName: get_Index

            Length

            Signature: int

Returns the length of the captured substring.

CompiledName: get_Length

            Name

            Signature: string

Returns name of capture group.

CompiledName: get_Name

            Success

            Signature: bool

Returns a value indicating whether the match is successful.

CompiledName: get_Success

            Value

            Signature: string

Returns the captured substring from the input string.

CompiledName: get_Value

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>FsRegEx - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

FsRegEx

  Namespace: global

Types and functions supporting composable F# regular expressions.

Nested types and modules

Type	Description

            FsGroup

Composable wrapping type for System.Text.RegularExpressions.Group.

            FsMatch

Composable wrapping type for System.Text.RegularExpressions.Match. Represents the results from a single regular expression match.

            FsRegEx

Composable immutable wrapping type for System.Text.RegularExpressions.Regex.

Module	Description

            Unicode

Unicode enumerations

Functions and values

Function or value	Description

            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 FsRegEx beginning 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 FsRegEx beginning 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.

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>Unicode - FsRegEx</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content="Jack Fox"/>

    <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>

    <link type="text/css" rel="stylesheet" href="/FsRegEx/content/style.css" />

fsharp.org

github page

FsRegEx

Unicode

  Namespace: global

  Parent Module: FsRegEx

Unicode enumerations

Nested types and modules

Type	Description

            SupportedNamedBlock

Enum .NET Framework named Unicode blocks

            UnicodeGeneralCategory

Enum Unicode defined general categories

FsRegEx

Home page

Get Library via NuGet

Source Code on GitHub

License

Release Notes

Examples

Matching

Match Groups

Replace and Split

Capture

Documentation

API Reference

More...

On the Futility of Email Regex Validation

F# Verbal Expressions Tutorial


text:
### Description

Please provide a succinct description of your issue.

### Repro steps

Please provide the steps required to reproduce the problem

1. Step A

2. Step B

### Expected behavior

Please provide a description of the behavior you expect.

### Actual behavior

Please provide a description of the actual behavior you observe.

### Known workarounds

Please provide a description of any known workarounds.

### Related information

* Operating system
* Branch
* .NET Runtime, CoreCLR or Mono Version
* Performance information, links to performance testing scripts


text:
/// Types and functions supporting composable F# regular expressions.
module FsRegEx

open System
open System.Text.RegularExpressions

///Unicode enumerations
module Unicode =
    ///Enum Unicode defined general categories
    type UnicodeGeneralCategory =
        ///Letter, Uppercase; Lu
        | LetterUppercase
        ///Letter, Lowercase; Ll
        | LetterLowercase
        ///Letter, Titlecase; Lt
        | LetterTitlecase
        ///Letter, Modifier; Lm
        | LetterModifier
        ///Letter, Other; Lo
        | LetterOther
        ///All letter characters. This includes the LetterUppercase, LetterLowercase, LetterTitlecase, LetterModifier, and LetterOther characters; L
        | Letter
        ///Mark, Nonspacing; Mn
        | MarkNonspacing
        ///Mark, Spacing Combining; Mc
        | MarkSpacingCombining
        ///Mark, Enclosing; Me
        | MarkEnclosing
        ///All diacritic marks. This includes the MarkNonspacing, MarkSpacingCombining, and MarkEnclosing categories; M
        | Mark
        ///Number, Decimal Digit; Nd
        | NumberDecimalDigit
        ///Number, Letter; Nl
        | NumberLetter
        ///Number, Other; No
        | NumberOther
        ///All numbers. This includes the Nd, Nl, and No categories; N
        | NumberALL
        ///Punctuation, Connector; Pc
        | PunctuationConnector
        ///Punctuation, Dash; Pd
        | PunctuationDash
        ///Punctuation, Open; Ps
        | PunctuationOpen
        ///Punctuation, Close; Pe
        | PunctuationClose
        ///Punctuation, Initial quote (may behave like Ps or Pe depending on usage); Pi
        | PunctuationInitial
        ///Punctuation, Final quote (may behave like Ps or Pe depending on usage); Pf
        | PunctuationFinal
        ///Punctuation, Other; Po
        | PunctuationOther
        ///All punctuation characters. This includes the PunctuationConnector, PunctuationDash, PunctuationOpen, PunctuationClose, PunctuationInitial, PunctuationFinal, and PunctuationOther categories; P
        | Punctuation
        ///Symbol, Math; Sm
        | SymbolMath
        ///Symbol, Currency; Sc
        | SymbolCurrency
        ///Symbol, Modifier; Sk
        | SymbolModifier
        ///Symbol, Other; So
        | SymbolOther
        ///All symbols. This includes the SymbolMath, SymbolCurrency, SymbolModifier, and SymbolOther categories; S
        | Symbol
        ///Separator, Space; Zs
        | SeparatorSpace
        ///Separator, Line; Zl
        | SeparatorLine
        ///Separator, Paragraph; Zp
        | SeparatorParagraph
        ///All separator characters. This includes the SeparatorSpace, SeparatorLine, and SeparatorLine categories; Z
        | Separator
        ///Other, Control; Cc
        | OtherControl
        ///Other, Format; Cf
        | OtherFormat
        ///Other, Surrogate; Cs
        | OtherSurrogate
        ///Other, Private Use; Co
        | OtherPrivateUse
        ///Other, Not Assigned (no characters have this property); Cn
        | OtherNotAssigned
        ///All control characters. This includes the OtherControl, OtherFormat, OtherSurrogate, OtherPrivateUse, and OtherNotAssigned categories; C
        | ControlAll
        with
        override ToString : unit -> string

    ///Enum .NET Framework named Unicode blocks
    type SupportedNamedBlock =
        ///0000 - 007F
        | IsBasicLatin
        ///0080 - 00FF
        | IsLatin1Supplement
        ///0100 - 017F
        | IsLatinExtendedA
        ///0180 - 024F
        | IsLatinExtendedB
        ///0250 - 02AF
        | IsIPAExtensions
        ///02B0 - 02FF
        | IsSpacingModifierLetters
        ///0300 - 036F
        | IsCombiningDiacriticalMarks
        ///0370 - 03FF
        | IsGreek
        ///0370 - 03FF
        | IsGreekandCoptic
        ///0400 - 04FF
        | IsCyrillic
        ///0500 - 052F
        | IsCyrillicSupplement
        ///0530 - 058F
        | IsArmenian
        ///0590 - 05FF
        | IsHebrew
        ///0600 - 06FF
        | IsArabic
        ///0700 - 074F
        | IsSyriac
        ///0780 - 07BF
        | IsThaana
        ///0900 - 097F
        | IsDevanagari
        ///0980 - 09FF
        | IsBengali
        ///0A00 - 0A7F
        | IsGurmukhi
        ///0A80 - 0AFF
        | IsGujarati
        ///0B00 - 0B7F
        | IsOriya
        ///0B80 - 0BFF
        | IsTamil
        ///0C00 - 0C7F
        | IsTelugu
        ///0C80 - 0CFF
        | IsKannada
        ///0D00 - 0D7F
        | IsMalayalam
        ///0D80 - 0DFF
        | IsSinhala
        ///0E00 - 0E7F
        | IsThai
        ///0E80 - 0EFF
        | IsLao
        ///0F00 - 0FFF
        | IsTibetan
        ///1000 - 109F
        | IsMyanmar
        ///10A0 - 10FF
        | IsGeorgian
        ///1100 - 11FF
        | IsHangulJamo
        ///1200 - 137F
        | IsEthiopic
        ///13A0 - 13FF
        | IsCherokee
        ///1400 - 167F
        | IsUnifiedCanadianAboriginalSyllabics
        ///1680 - 169F
        | IsOgham
        ///16A0 - 16FF
        | IsRunic
        ///1700 - 171F
        | IsTagalog
        ///1720 - 173F
        | IsHanunoo
        ///1740 - 175F
        | IsBuhid
        ///1760 - 177F
        | IsTagbanwa
        ///1780 - 17FF
        | IsKhmer
        ///1800 - 18AF
        | IsMongolian
        ///1900 - 194F
        | IsLimbu
        ///1950 - 197F
        | IsTaiLe
        ///19E0 - 19FF
        | IsKhmerSymbols
        ///1D00 - 1D7F
        | IsPhoneticExtensions
        ///1E00 - 1EFF
        | IsLatinExtendedAdditional
        ///1F00 - 1FFF
        | IsGreekExtended
        ///2000 - 206F
        | IsGeneralPunctuation
        ///2070 - 209F
        | IsSuperscriptsandSubscripts
        ///20A0 - 20CF
        | IsCurrencySymbols
        ///20D0 - 20FF
        | IsCombiningDiacriticalMarksforSymbols
        ///20D0 - 20FF
        | IsCombiningMarksforSymbols
        ///2100 - 214F
        | IsLetterlikeSymbols
        ///2150 - 218F
        | IsNumberForms
        ///2190 - 21FF
        | IsArrows
        ///2200 - 22FF
        | IsMathematicalOperators
        ///2300 - 23FF
        | IsMiscellaneousTechnical
        ///2400 - 243F
        | IsControlPictures
        ///2440 - 245F
        | IsOpticalCharacterRecognition
        ///2460 - 24FF
        | IsEnclosedAlphanumerics
        ///2500 - 257F
        | IsBoxDrawing
        ///2580 - 259F
        | IsBlockElements
        ///25A0 - 25FF
        | IsGeometricShapes
        ///2600 - 26FF
        | IsMiscellaneousSymbols
        ///2700 - 27BF
        | IsDingbats
        ///27C0 - 27EF
        | IsMiscellaneousMathematicalSymbolsA
        ///27F0 - 27FF
        | IsSupplementalArrowsA
        ///2800 - 28FF
        | IsBraillePatterns
        ///2900 - 297F
        | IsSupplementalArrowsB
        ///2980 - 29FF
        | IsMiscellaneousMathematicalSymbolsB
        ///2A00 - 2AFF
        | IsSupplementalMathematicalOperators
        ///2B00 - 2BFF
        | IsMiscellaneousSymbolsandArrows
        ///2E80 - 2EFF
        | IsCJKRadicalsSupplement
        ///2F00 - 2FDF
        | IsKangxiRadicals
        ///2FF0 - 2FFF
        | IsIdeographicDescriptionCharacters
        ///3000 - 303F
        | IsCJKSymbolsandPunctuation
        ///3040 - 309F
        | IsHiragana
        ///30A0 - 30FF
        | IsKatakana
        ///3100 - 312F
        | IsBopomofo
        ///3130 - 318F
        | IsHangulCompatibilityJamo
        ///3190 - 319F
        | IsKanbun
        ///31A0 - 31BF
        | IsBopomofoExtended
        ///31F0 - 31FF
        | IsKatakanaPhoneticExtensions
        ///3200 - 32FF
        | IsEnclosedCJKLettersandMonths
        ///3300 - 33FF
        | IsCJKCompatibility
        ///3400 - 4DBF
        | IsCJKUnifiedIdeographsExtensionA
        ///4DC0 - 4DFF
        | IsYijingHexagramSymbols
        ///4E00 - 9FFF
        | IsCJKUnifiedIdeographs
        ///A000 - A48F
        | IsYiSyllables
        ///A490 - A4CF
        | IsYiRadicals
        ///AC00 - D7AF
        | IsHangulSyllables
        ///D800 - DB7F
        | IsHighSurrogates
        ///DB80 - DBFF
        | IsHighPrivateUseSurrogates
        ///DC00 - DFFF
        | IsLowSurrogates
        ///E000 - F8FF
        | IsPrivateUse
        ///F900 - FAFF
        | IsCJKCompatibilityIdeographs
        ///FB00 - FB4F
        | IsAlphabeticPresentationForms
        ///FB50 - FDFF
        | IsArabicPresentationFormsA
        ///FE00 - FE0F
        | IsVariationSelectors
        ///FE20 - FE2F
        | IsCombiningHalfMarks
        ///FE30 - FE4F
        | IsCJKCompatibilityForms
        ///FE50 - FE6F
        | IsSmallFormVariants
        ///FE70 - FEFF
        | IsArabicPresentationFormsB
        ///FF00 - FFEF
        | IsHalfwidthandFullwidthForms
        ///FFF0 - FFFF
        | IsSpecials
        with
        override ToString : unit -> string

///Composable wrapping type for System.Text.RegularExpressions.Group.
type FsGroup =
  class
    new : name:string * group:Group -> FsGroup
    ///Array of all the captures matched by the capturing group, in innermost-leftmost-first order (or innermost-rightmost-first order if the regular expression is modified with the RegexOptions.RightToLeft option). The collection may have zero or more items.
    member Captures : unit -> Capture []
    override Equals : yobj:obj -> bool
    override GetHashCode : unit -> int
    override ToString : unit -> string
    ///The underlying System.Text.RegularExpressions.Group. Represents the results from a single capturing group.
    member Group : System.Text.RegularExpressions.Group
    ///The position in the original string where the first character of the captured substring is found.
    member Index : int
    ///Returns the length of the captured substring.
    member Length : int
    ///Returns name of capture group.
    member Name : string
    ///Returns a value indicating whether the match is successful.
    member Success : bool
    ///Returns the captured substring from the input string.
    member Value : string
  end

///Composable wrapping type for System.Text.RegularExpressions.Match. Represents the results from a single regular expression match.
type FsMatch =
  class
    new : regex:Regex * fsMatch:Match -> FsMatch
    ///Array of all the captures matched by the capturing group, in innermost-leftmost-first order (or innermost-rightmost-first order if the regular expression is modified with the RegexOptions.RightToLeft option). The collection may have zero or more items.
    member Captures : unit -> Capture []
    override Equals : yobj:obj -> bool
    override GetHashCode : unit -> int
    /// Capturing groups matched by regular expression.
    member Groups : unit -> FsGroup []
    ///Returns the expansion of the specified replacement pattern.
    member Result : replacement:string -> string
    override ToString : unit -> string
    ///The position in the original string where the first character of the captured substring is found.
    member Index : int
    ///Returns the length of the captured substring.
    member Length : int
    ///Wrapped System.Text.RegularExpressions.Match. Represents the results from a single regular expression match.
    member Match : Match
    ///Returns a value indicating whether the match is successful.
    member Success : bool
    ///Returns the captured substring from the input string.
    member Value : string
  end

///Composable immutable wrapping type for System.Text.RegularExpressions.Regex.
type FsRegEx =
    new : unit -> FsRegEx
    new : regexOptions : RegexOptions -> FsRegEx
    new : regularExpression : string -> FsRegEx
    new : regularExpression : string * regexOptions : RegexOptions -> FsRegEx
    new : regularExpression : string * regexOptions : RegexOptions * matchTimeout : TimeSpan -> FsRegEx

    ///Match and select groupname value.
    member Capture : input : string -> string -> string

    member internal Clone : regexOptions : RegexOptions option -> FsRegEx
    member internal Prefixes : string with get, set
    member internal Source : string with get, set
    member internal Suffixes : string with get, set

    ///Gets the group name that corresponds to the specified group number.
    member GroupNameFromNumber : n : int -> string option

    ///Returns an array of capturing group names for the regular expression.
    member GroupNames : unit -> array<string>

    ///Returns the group number that corresponds to the specified group name.
    member GroupNumberFromName : groupName : string -> int option

    ///Returns an array of capturing group numbers that correspond to group names in an array.
    member GroupNumbers : unit -> array<int>

    ///Indicates whether the regular expression finds a match in the input string.
    member IsMatch : input : string -> bool

    ///Indicates whether the regular expression finds a match in the input string beginning at the specified starting position.
    member IsMatch : input : string * startAt : int -> bool

    ///Searches the specified input string for the first occurrence of the regular expression.
    member Match : input : string -> FsMatch

    ///Searches the specified input string for the first occurrence of the regular expression beginning at the specified starting position.
    member Match : input : string * startAt : int -> FsMatch

    ///Searches the specified input string for the first occurrence of the regular expression beginning at the starting position for the length.
    member Match : input : string * startAt : int * length : int -> FsMatch

    ///Searches the specified input string for all occurrences of a regular expression.
    member Matches : input : string -> FsMatch[]

    ///Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position.
    member Matches : input : string * startAt : int -> FsMatch[]

    ///Gets the time-out interval of the current instance.
    member MatchTimeout : TimeSpan

    ///The underlying System.Text.RegularExpressions.Regex
    member Regex : Regex

    ///Enumerated values to use to set regular expression options.
    member RegexOptions : RegexOptions

    ///In input string replaces all strings that match regular expression pattern with replacement string.
    member Replace : input : string * replacement : string -> string

    ///In input string replaces all strings that match regular expression with string returned by MatchEvaluator delegate.
    member Replace : input : string * evalutor : MatchEvaluator -> string

    ///In input string replaces a specified maximum number of strings that match regular expression with replacement string.
    member Replace : input : string * replacement : string * count : int -> string

    ///In input string replaces a specified maximum number of strings that match a regular expression with string returned by MatchEvaluator delegate.
    member Replace : input : string * evalutor : MatchEvaluator * count : int -> string

    ///In input string beginning at start at position replaces a specified maximum number of strings that match regular expression with replacement string.
    member Replace : input : string * replacement : string * count : int * startAt : int -> 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.
    member Replace : input : string * evalutor : MatchEvaluator * count : int * startAt : int -> string

    ///Indicates whether the regular expression searches from right to left.
    member RightToLeft : bool

    ///Splits input string into an array of substrings at the positions defined by regular expression.
    member Split : input : string -> array<string>

    ///Splits input string a specified maximum number of times into an array of substrings at the positions defined by regular expression.
    member Split : input : string * count : int -> array<string>

    ///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.
    member Split : input : string * count : int * startAt : int -> array<string>

///Searches the specified input string for the first occurrence of the regular expression.
val firstMatch : regularExpression : string -> input : string -> FsMatch

///Searches the specified input string for the first occurrence of the regular expression with Regex options.
val firstMatchOpt : regularExpression : string -> regexOptions : RegexOptions -> input : string -> FsMatch

///Searches the specified input string for the first occurrence of the regular expression beginning at the specified starting position.
val matchAt : 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 with Regex options.
val matchAtOpt : regularExpression : string -> regexOptions : RegexOptions -> startAt : int -> input : string -> FsMatch

///Searches the specified input string for the first occurrence of the FsRegEx beginning at the starting position for the length.
val matchAtFor : regularExpression : string -> startAt : int ->  length : int -> input : string -> FsMatch

///Searches the specified input string for the first occurrence of the FsRegEx beginning at the starting position for the length with Regex options.
val matchAtForOpt : regularExpression : string -> regexOptions : RegexOptions -> startAt : int ->  length : int -> input : string -> FsMatch

///Searches the specified input string for all occurrences of a regular expression with Regex options.
val matches : regularExpression : string -> input : string -> FsMatch[]

///Searches the specified input string for all occurrences of a regular expression.
val matchesOpt : regularExpression : string -> regexOptions : RegexOptions -> input : string -> FsMatch[]

///Searches the input string for all occurrence of a regular expression, beginning at the specified starting position.
val matchesAt : regularExpression : string -> 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.
val matchesAtOpt : regularExpression : string -> regexOptions : RegexOptions -> startAt : int -> input : string -> FsMatch[]

///In input string replaces all strings that match regular expression pattern with replacement string.
val replace : regularExpression : string -> replacement : string -> input : string -> string

///In input string replaces all strings that match regular expression with string returned by MatchEvaluator delegate.
val replaceByMatch : regularExpression : string -> evalutor : MatchEvaluator -> input : string -> string

///In input string replaces all strings that match regular expression with string returned by MatchEvaluator delegate with Regex options.
val replaceByMatchOpt : regularExpression : string -> regexOptions : RegexOptions -> evalutor : MatchEvaluator -> input : string -> string

///In input string replaces a specified maximum number of strings that match regular expression with replacement string.
val replaceMaxTimes : 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 with Regex options.
val replaceMaxTimesOpt : regularExpression : string -> regexOptions : RegexOptions -> replacement : string -> 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.
val replaceByMatchMaxTimes : 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 with Regex options.
val replaceByMatchMaxTimesOpt : regularExpression : string -> regexOptions : RegexOptions -> evalutor : MatchEvaluator -> count : 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.
val replaceMaxTimesStartAt : 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 with Regex options.
val replaceMaxTimesStartAtOpt : 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 a regular expression with string returned by MatchEvaluator delegate.
val replaceByMatchMaxTimesStartAt : 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 with Regex options.
val replaceByMatchMaxTimesStartAtOpt : regularExpression : string -> regexOptions : RegexOptions -> evalutor : MatchEvaluator -> count : int -> startAt : int -> input : string -> string

///Splits input string into an array of substrings at the positions defined by regular expression.
val split : regularExpression : string -> input : string -> array<string>

///Splits input string into an array of substrings at the positions defined by regular expression with Regex options.
val splitOpt : regularExpression : string -> regexOptions : RegexOptions -> input : string -> array<string>

///Splits input string a specified maximum number of times into an array of substrings at the positions defined by regular expression.
val splitMaxTimes : regularExpression : string -> count : int -> input : string -> array<string>

///Splits input string a specified maximum number of times into an array of substrings at the positions defined by regular expression with Regex options.
val splitMaxTimesOpt : regularExpression : string -> regexOptions : RegexOptions -> count : int -> input : string -> array<string>

///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.
val splitMaxTimesStartAt : regularExpression : string -> count : int -> startAt : int -> input : string -> array<string>

///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.
val splitMaxTimesStartAtOpt : regularExpression : string -> regexOptions : RegexOptions -> count : int -> startAt : int -> input : string -> array<string>

///Match and select groupname value.
val capture : regularExpression : string  -> groupName : string -> input : string -> string

///Match and select groupname value with Regex options.
val captureOpt : regularExpression : string  -> regexOptions : RegexOptions -> groupName : string -> input : string -> string

///Match and select group.
val captureGroup : regularExpression : string -> groupName : string -> input : string -> FsGroup

///Match and select group with Regex options.
val captureGroupOpt : regularExpression : string -> regexOptions : RegexOptions -> groupName : string -> input : string -> FsGroup

///Returns an array of capturing group names for the regular expression.
val groupNames : regularExpression : string -> array<string>

///Returns an array of capturing group numbers that correspond to group names in an array.
val groupNumbers : regularExpression : string -> array<int>

///Indicates whether the regular expression finds a match in the input string.
val isMatch : regularExpression : string  -> input : string -> bool

///Indicates whether the regular expression finds a match in the input string with Regex options.
val isMatchOpt : regularExpression : string  -> regexOptions : RegexOptions -> input : string -> bool

///Indicates whether the regular expression finds a match in the input string beginning at the specified starting position.
val isMatchAt : 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 with Regex options.
val isMatchAtOpt : regularExpression : string -> regexOptions : RegexOptions -> startAt : int -> input : string -> bool


text:
type file
id FsRegEx
title
    FsRegEx
owners
    Jack Fox
authors
    Jack Fox
projectUrl
    https://jackfoxy.github.io/FsRegEx/
iconUrl
    https://raw.githubusercontent.com/jackfoxy/FsRegEx/master/docs/img/logo.png
licenseUrl
    https://github.com/jackfoxy/FsRegEx/blob/master/LICENSE.txt
requireLicenseAcceptance
    false
language
    F#
copyright
    Copyright 2018
tags
    F# fsharp regularexpression regularexpressions
summary
    Composable F# regular expressions.
description
    FsRegEx provides composable F# functionality for all the capabilities of the .NET Regex class including supporting pipe forward |> composability.

files
	../../bin/FsRegEx ==> lib


text:
///Common regular expressions in FsRegEx type.
module CommonFsRegEx

open FsRegEx

///Valid email string. (Note that RE email validation is ill-advised.)
val Email : FsRegEx

///Valid Url string.
val Url : FsRegEx