class

Logos::Pattern

Inherits Reference < Object

Compiled pattern with metadata

Constructors

compile_literal(source : String) : self

Create pattern from literal string

Source
compile_regex(source : String, unicode : Bool = true, ignore_case : Bool = false) : self

Create pattern from regex string

Source
new(literal : Bool, source : String, hir : ::Regex::Syntax::Hir::Hir | Nil = nil, bytes : Bytes | Nil = nil)
Source

Instance methods

bytes
Source
check_for_greedy_all

Check for problematic patterns like greedy .* or .+

Source
literal?
Source
priority

Calculate priority/complexity for disambiguation

Source
source
Source