+
Point of view
All features
expanded class REGULAR_EXPRESSION_BUILDER
Summary
Regular expression building from various dialects. Some REGULAR_EXPRESSION object is build from a string describing a pattern. A regular expression is a pattern that is matched against a subject string.
See tutorial/regular_expression for usage.
Direct parents
Insert list: ANY
Overview
Features
{ANY}
options
{ANY}
Error informations
{ANY}
Internal
{}
convert_posix_pattern (p: STRING): REGULAR_EXPRESSION
effective function
{ANY}
Create some REGULAR_EXPRESSION from the pattern p according to POSIX syntax.
If p is not a valid regular expression according to POSIX syntax, then Result is Void and last_error_message and last_error_position are set.
require
  • p /= Void
ensure
  • Result /= Void xor last_error_message /= Void
  • initialized: Result /= Void implies not Result.last_match_succeeded
  • substitution_cleared: Result /= Void implies not Result.substitution_pattern_ready
convert_perl_pattern (p: STRING): REGULAR_EXPRESSION
effective function
{ANY}
Create some REGULAR_EXPRESSION from the pattern p according to Perl syntax.
If p is not a valid regular expression according to Perl syntax, then Result is Void and last_error_message and last_error_position are set.
require
  • p /= Void
ensure
  • Result /= Void xor last_error_message /= Void
  • initialized: Result /= Void implies not Result.last_match_succeeded
  • substitution_cleared: Result /= Void implies not Result.substitution_pattern_ready
convert_python_pattern (p: STRING): REGULAR_EXPRESSION
effective function
{ANY}
Create some REGULAR_EXPRESSION from the pattern p according to Python syntax.
If p is not a valid regular expression according to Python syntax, then Result is Void and last_error_message and last_error_position are set.
require
  • p /= Void
ensure
  • Result /= Void xor last_error_message /= Void
  • initialized: Result /= Void implies not Result.last_match_succeeded
  • substitution_cleared: Result /= Void implies not Result.substitution_pattern_ready
is_case_insensitive: BOOLEAN
writable attribute
{ANY}
Is the match case insensitive?
Default is False
is_case_sensitive: BOOLEAN
effective function
{ANY}
Is the match case sensitive?
Default is True
set_case_sensitive
effective procedure
{ANY}
Set the match as case sensitive.
ensure
set_case_insensitive
effective procedure
{ANY}
Set the match as case insensitive.
ensure
does_any_match_newline: BOOLEAN
writable attribute
{ANY}
Does the "any character" mark match a newline?
Default is False
set_any_match_newline
effective procedure
{ANY}
The "any character" mark will match a newline.
ensure
set_any_dont_match_newline
effective procedure
{ANY}
The "any character" mark will not match a newline.
ensure
does_match_line_boundary: BOOLEAN
writable attribute
{ANY}
Does the begin/end marks match line boundary?
Default is False
does_match_text_boundary: BOOLEAN
effective function
{ANY}
Does the begin/end marks match text boundary?
Default is True
ensure
set_match_line_boundary
effective procedure
{ANY}
The begin/end marks will match line boundary.
ensure
set_match_text_boundary
effective procedure
{ANY}
The begin/end marks will match text boundary.
ensure
has_extended_legibility: BOOLEAN
writable attribute
{ANY}
Is the extended legibility active?
has_extended_ligibility: BOOLEAN
effective function
{ANY}
This feature is obsolete: Use `has_extended_legibility' instead.
set_extended_legibility
effective procedure
{ANY}
Activate extended legibility.
ensure
set_extended_ligibility
effective procedure
{ANY}
This feature is obsolete: Use `set_extended_legibility' instead.
set_no_extended_legibility
effective procedure
{ANY}
Deactivate extended legibility.
ensure
set_no_extended_ligibility
effective procedure
{ANY}
This feature is obsolete: Use `set_no_extended_legibility' instead.
set_default_options
effective procedure
{ANY}
Set the default options
last_error_message: STRING
writable attribute
{ANY}
Used to report error during last creation attempt.
last_error_position: INTEGER_32
writable attribute
{ANY}
Used to report error position during last creation attempt.
once function
{}
The builder for the POSIX syntax
once function
{}
The builder for the PERL5 syntax
once function
{}
The builder for the Python syntax
effective function
{}
Create some BACKTRACKING_REGULAR_EXPRESSION from the pattern p according to the syntax passed by the given 'builder'.
If p is not a valid regular expression according the said syntax, then Result is Void and last_error_message and last_error_message are set.
require
  • p /= Void and builder /= Void
ensure
  • Result /= Void xor last_error_message /= Void
  • initialized: Result /= Void implies not Result.last_match_succeeded
  • substitution_cleared: Result /= Void implies not Result.substitution_pattern_ready