Enum Class RegexMatchFlags

java.lang.Object
java.lang.Enum<RegexMatchFlags>
org.gnome.glib.RegexMatchFlags
All Implemented Interfaces:
Serializable, Comparable<RegexMatchFlags>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum RegexMatchFlags extends Enum<RegexMatchFlags> implements Enumeration
Flags specifying match-time options.
Since:
2.14
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched.
    Overrides the newline definition for "\R" set when creating a new GRegex; any Unicode newline character or character sequence are recognized as a newline by "\R".
    Overrides the newline definition for "\R" set when creating a new GRegex; only '\r', '\n', or '\r\n' character sequences are recognized as a newline by "\R".
    No special options set.
    Overrides the newline definition set when creating a new GRegex, any Unicode newline sequence is recognised as a newline.
    Overrides the newline definition set when creating a new GRegex; any '\r', '\n', or '\r\n' character sequence is recognized as a newline.
    Overrides the newline definition set when creating a new GRegex, setting the '\r' character as line terminator.
    Overrides the newline definition set when creating a new GRegex, setting the '\r\n' characters sequence as line terminator.
    Overrides the newline definition set when creating a new GRegex, setting the '\n' character as line terminator.
    Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it.
    An empty string is not considered to be a valid match if this option is set.
    Like NOTEMPTY, but only applied to the start of the matched string.
    Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it.
    Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
    Turns on the partial matching feature.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final RegexMatchFlags
    An alias for PARTIAL.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the numeric value of this enum
    of(int flags)
    Create a new EnumSet<RegexMatchFlags> for the provided bitfield
    of(MemorySegment address)
    Create a new EnumSet<RegexMatchFlags> for the bitfield in the provided memory address.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DEFAULT

      public static final RegexMatchFlags DEFAULT
      No special options set. Since: 2.74
    • ANCHORED

      public static final RegexMatchFlags ANCHORED
      The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharacter.
    • NOTBOL

      public static final RegexMatchFlags NOTBOL
      Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without RegexCompileFlags.MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
    • NOTEOL

      public static final RegexMatchFlags NOTEOL
      Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without RegexCompileFlags.MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
    • NOTEMPTY

      public static final RegexMatchFlags NOTEMPTY
      An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
    • PARTIAL

      public static final RegexMatchFlags PARTIAL
      Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
    • NEWLINE_CR

      public static final RegexMatchFlags NEWLINE_CR
      Overrides the newline definition set when creating a new GRegex, setting the '\r' character as line terminator.
    • NEWLINE_LF

      public static final RegexMatchFlags NEWLINE_LF
      Overrides the newline definition set when creating a new GRegex, setting the '\n' character as line terminator.
    • NEWLINE_CRLF

      public static final RegexMatchFlags NEWLINE_CRLF
      Overrides the newline definition set when creating a new GRegex, setting the '\r\n' characters sequence as line terminator.
    • NEWLINE_ANY

      public static final RegexMatchFlags NEWLINE_ANY
      Overrides the newline definition set when creating a new GRegex, any Unicode newline sequence is recognised as a newline. These are '\r', '\n' and '\rn', and the single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR.
    • NEWLINE_ANYCRLF

      public static final RegexMatchFlags NEWLINE_ANYCRLF
      Overrides the newline definition set when creating a new GRegex; any '\r', '\n', or '\r\n' character sequence is recognized as a newline. Since: 2.34
    • BSR_ANYCRLF

      public static final RegexMatchFlags BSR_ANYCRLF
      Overrides the newline definition for "\R" set when creating a new GRegex; only '\r', '\n', or '\r\n' character sequences are recognized as a newline by "\R". Since: 2.34
    • BSR_ANY

      public static final RegexMatchFlags BSR_ANY
      Overrides the newline definition for "\R" set when creating a new GRegex; any Unicode newline character or character sequence are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR. Since: 2.34
    • PARTIAL_HARD

      public static final RegexMatchFlags PARTIAL_HARD
      Turns on the partial matching feature. In contrast to to PARTIAL_SOFT, this stops matching as soon as a partial match is found, without continuing to search for a possible complete match. See g_match_info_is_partial_match() for more information. Since: 2.34
    • NOTEMPTY_ATSTART

      public static final RegexMatchFlags NOTEMPTY_ATSTART
      Like NOTEMPTY, but only applied to the start of the matched string. For anchored patterns this can only happen for pattern containing "\K". Since: 2.34
  • Field Details

  • Method Details

    • values

      public static RegexMatchFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RegexMatchFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<RegexMatchFlags> of(int flags)
      Create a new EnumSet<RegexMatchFlags> for the provided bitfield
      Parameters:
      flags - the RegexMatchFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<RegexMatchFlags> of(MemorySegment address)
      Create a new EnumSet<RegexMatchFlags> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address