extension * and extension array declaration #150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Behavior of "*" has expanded. Now it can mean the absence of characters, as well as prefixes and endings. This is more convenient than combing these options.
In regular expressions with an asterisk, '(. +?)' was replaced with '(. *?)' handling different variants. (If an asterisk is written with a word, endings / prefixes may change. There may also be no prefixes. When an asterisk is at the beginning of a line with a space, there may or may not be a word. Asterisk at the end of a line after a space will also work. New functionality is placed into the 'asterisk_processing' function.
Tests are added into the 'tests' directory for all cases.
Examples:
1.1.
Are you from Russia?
This will work for "I am from Russia" or "I am from RussiaFederation" etc.
1.2.
== brasi => Are you from Brasilia?
Are you from big city?
This will work for "I am from Brasilia" or "I am from Sicilia" etc.
1.3.
I love you, my !
This will work for "Hello my best friend" or "Hello my best best friend" or "Hello my best little bestfriend" or "Hello my friend" etc.
When creating arrays, we've added [] syntax. Square brackets mean that a phrase can contain either a word within those brackets, or the absence of a word.
We achieved this with a specific regex that replaces square brackets.
Examples:
1.1.
! array hi = hi|[hello] hi|welcome
Hi Hi!
This will work for "welcome" or "Hello, Hi" etc.