<commit_before>= MetaRegexp

 This project is incomplete and has been superceded by regexp_parser.
 The ideas here will be revisted after the standalone parser has been completed.

== What is it

An experimental regular expression "preprocessor" that parses and then
recompiles regular expressions to accomplish the following:

* Expansion: expand repeated grouped expressions to enable repeated
  captures without manually duplicating patterns.

* Aliases: recognizes and substitutes registered regular expression
  aliases at any depth (aliases can contain aliases), including the
  expansion of any grouped expressions within.


== Repetition Expansion

With repetition expansion the following regular expression:

  /([a-z]+){1,3}/

becomes:

  /([a-z]+)([a-z]+)?([a-z]+)?/

If the first regex matches, only the last match is captured, while<commit_msg>Rephrased the project status note, thanks to @gams<commit_after>= MetaRegexp

 This project has been superceded by regexp_parser. The main functionality described
 below works, but there are a few missing things, like proper handling of some escape
 sequences, and possible others. The ideas presented here will be revisted after the
 standalone parser has been completed.

== What is it

An experimental regular expression "preprocessor" that parses and then
recompiles regular expressions to accomplish the following:

* Expansion: expand repeated grouped expressions to enable repeated
  captures without manually duplicating patterns.

* Aliases: recognizes and substitutes registered regular expression
  aliases at any depth (aliases can contain aliases), including the
  expansion of any grouped expressions within.


== Repetition Expansion

With repetition expansion the following regular expression:

  /([a-z]+){1,3}/

becomes:

  /([a-z]+)([a-z]+)?([a-z]+)?/

If the first regex matches, only the last match is captured, while
{'fraction_non_alphanumeric': 0.0654353562005277, 'fraction_numerical': 0.0021108179419525065, 'mean_word_length': 4.962264150943396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7074259', 'n_tokens_mistral': 485, 'n_tokens_neox': 464, 'n_words': 235}