getEnd(name:)

    Returns the end position of the match within the source string. The end position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it’s a named group). The default value of 0 refers to the whole pattern.

    RegExMatch.swift:198
    final func getEnd(name: Variant) -> Int32

    Returns -1 if the group did not match or doesn’t exist.

    Other members in extension

    Type members

    Instance members

    • var names: GDictionary

      A dictionary of named groups and its corresponding group number. Only groups that were matched are included. If multiple groups have the same name, that name would refer to the first matching one.

    • var strings: PackedStringArray

      An GArray of the match and its capturing groups.

    • var subject: String

      The source string used with the search pattern to find this matching result.

    • func getGroupCount() -> Int32

      Returns the number of capturing groups.

    • func getStart(name: Variant) -> Int32

      Returns the starting position of the match within the source string. The starting position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it’s a named group). The default value of 0 refers to the whole pattern.

    • func getString(name: Variant) -> String

      Returns the substring of the match from the source string. Capturing groups can be retrieved by providing its group number as an integer or its string name (if it’s a named group). The default value of 0 refers to the whole pattern.