Skip to content

Latest commit

 

History

History
157 lines (87 loc) · 5.53 KB

File metadata and controls

157 lines (87 loc) · 5.53 KB

Pattern.IfGroup Method

Home

Containing Type: Pattern

Assembly: Pihrtsoft.Text.RegularExpressions.Linq.dll

Overloads

Method Summary
IfGroup(Int32, Object) Appends an if construct with a content to match if the numbered group is matched.
IfGroup(Int32, Object, Object) Appends an if construct with a content to match if the numbered group is matched and a content to match if the numbered group is not matched.
IfGroup(String, Object) Appends an if construct with a content to match if the named group is matched.
IfGroup(String, Object, Object) Appends an if construct with a content to match if the named group is matched and a content to match if the named group is not matched.

IfGroup(Int32, Object)


Appends an if construct with a content to match if the numbered group is matched.

public Pihrtsoft.Text.RegularExpressions.Linq.QuantifiablePattern IfGroup(int groupNumber, object trueContent)

Parameters

groupNumberInt32

A number of the group.

trueContentObject

The content to be matched if the numbered group is matched.

Returns

QuantifiablePattern

Exceptions

ArgumentNullException

trueContent is null.

ArgumentOutOfRangeException

groupNumber is less than zero.

IfGroup(Int32, Object, Object)


Appends an if construct with a content to match if the numbered group is matched and a content to match if the numbered group is not matched.

public Pihrtsoft.Text.RegularExpressions.Linq.QuantifiablePattern IfGroup(int groupNumber, object trueContent, object falseContent)

Parameters

groupNumberInt32

A number of the group.

trueContentObject

The content to be matched if the numbered group is matched.

falseContentObject

The content to be matched if the numbered group is not matched.

Returns

QuantifiablePattern

Exceptions

ArgumentNullException

trueContent is null.

ArgumentOutOfRangeException

groupNumber is less than zero.

IfGroup(String, Object)


Appends an if construct with a content to match if the named group is matched.

public Pihrtsoft.Text.RegularExpressions.Linq.QuantifiablePattern IfGroup(string groupName, object trueContent)

Parameters

groupNameString

A name of the group.

trueContentObject

The content to be matched if the named group is matched.

Returns

QuantifiablePattern

Exceptions

ArgumentException

groupName is not a valid regex group name.

ArgumentNullException

groupName or trueContent is null.

IfGroup(String, Object, Object)


Appends an if construct with a content to match if the named group is matched and a content to match if the named group is not matched.

public Pihrtsoft.Text.RegularExpressions.Linq.QuantifiablePattern IfGroup(string groupName, object trueContent, object falseContent)

Parameters

groupNameString

A name of the group.

trueContentObject

The content to be matched if the named group is matched.

falseContentObject

The content to be matched if the named group is not matched.

Returns

QuantifiablePattern

Exceptions

ArgumentException

groupName is not a valid regex group name.

ArgumentNullException

groupName or trueContent is null.