Rust spanner regex

This module contains implementation of regex ie functions using the rust package enum-spanner-rs
# download_and_install_rust_regex()

source

rgx

 rgx (regex_pattern:str, out_type:str, text:Optional[str]=None,
      text_file:Optional[str]=None)

An IE function which runs regex using rust’s enum-spanner-rs and yields tuples of strings/spans (not both).

Type Default Details
regex_pattern str the pattern to run
out_type str string/span - decides which one will be returned
text Optional None the string on which regex is run
text_file Optional None use text from this file instead of text. default: None
Returns Iterable a tuple of strings/spans

source

rgx_span

 rgx_span (text:str, regex_pattern:str)

*computes the spans of all the matches of the regex pattern in the text

based on the enum-spanner-rs rust package*

Type Details
text str The input text for the regex operation
regex_pattern str The pattern of the regex operation
Returns Iterable tuples of spans that represents the results

source

rgx_string

 rgx_string (text:str, regex_pattern:str)
Type Details
text str The input text for the regex operation
regex_pattern str he pattern of the regex operation
Returns Iterable tuples of strings that represents the results

source

rgx_span_from_file

 rgx_span_from_file (text_file:str, regex_pattern:str)
Type Details
text_file str The input file for the regex operation
regex_pattern str The pattern of the regex operation
Returns Iterable tuples of spans that represents the results

source

rgx_string_from_file

 rgx_string_from_file (text_file:str, regex_pattern:str)
Type Details
text_file str The input file for the regex operation
regex_pattern str The pattern of the regex operation
Returns Iterable tuples of strings that represents the results