Namespace: FluentRegex
Class GroupBuilder
builds groups for a regular expression pattern. Inherits from Builder.
public class GroupBuilder : Builder, IBuilder
Inheritance Object → Builder → GroupBuilder
Implements IBuilder
Gets or sets the pattern.
public StringBuilder Pattern { get; set; }
The name of the named capture group when GroupBuilder.GroupType is GroupType.NamedCapturing.
public string GroupName { get; }
The GroupType of the group.
public GroupType GroupType { get; }
The NamedGroupStyle of the group.
public Nullable<NamedGroupStyle> GroupStyle { get; }
Initializes a new instance of the GroupBuilder class with a PatternBuilder, and the declared NamedGroupStyle and GroupBuilder.GroupName.
public GroupBuilder(Builder patternBuilder, NamedGroupStyle namedGroupStyle, string groupName)
patternBuilder
Builder
namedGroupStyle
NamedGroupStyle
groupName
String
Initializes a new instance of the GroupBuilder class with a PatternBuilder, and the declared GroupBuilder.GroupType.
public GroupBuilder(Builder patternBuilder, GroupType groupType)
patternBuilder
Builder
groupType
GroupType
Initializes a new instance of the GroupBuilder class with a PatternBuilder.
public GroupBuilder(Builder patternBuilder)
patternBuilder
Builder
Builds the group.
public object Build()
Object
The PatternBuilder.
Initializes a new instance of the CharacterClassBuilder class which is used to build a character class inline.
public CharacterClassBuilder StartCharacterClass()
Starts building the group by adding an opening parenthesis to the pattern. Depending on the GroupBuilder.GroupType, the method will add the appropriate syntax to the pattern.
internal GroupBuilder Start_Group()
GroupBuilder
A new instance of the GroupBuilder class.
Initializes a new instance of the AnchorBuilder class which is used to build an anchor inline.
public AnchorBuilder StartAnchor()
AnchorBuilder
A new instance of the AnchorBuilder class.
The AppendLiteral
method appends a string to the pattern. This hides the IBuilder.AppendLiteral(String) method from the base class.
public GroupBuilder AppendLiteral(string literal)
literal
String
internal GroupBuilder EndGroup()
internal void Validate()