For this sample text:
A fast brown fox jumps over a lazy dog "- this is 1 *** English 2 *** pangram - a phrase containing all the letters of the alphabet. It is usually used for touch typing practice. It is also used to test typewriters and computer keyboards, display fonts and other applications containing all letters in the 3 *** English alphabet 4 ***.
I need one regex expression that should only match between multi-tone x *** characters, while removing the top and trailing spaces. If my limited knowledge of regular expression is correct, the result should match two separate search groups.
English
English alphabet
I have two expressions that work in isolation, but not in tandem:
(?<=1\*\*\*\s).*(?=\s2\*\*\*)
....
(?<=3\*\*\*\s).*(?=\s4\*\*\*)
I tried various ways to combine them in one expression, but only got the wrong results. eg.
(?<=1\*\*\*\s).*(?=\s2\*\*\*)\w+(?<=3\*\*\*\s).*(?=\s4\*\*\*)
NO MATCHES
I should point out that I have control over the token format, so feel free to recommend it based on the ease of use of regex. It just needs to contain a sequence of mostly non-alphanumeric characters so that it is not initially in the data. I guess I will probably need at least two tokens; one start and one end.
EDIT:
I have made progress, but my regex engine behaves differently than in regex101:
(?<=1\*\*\*\s)(.*)(?=\s2\*\*\*).*?(?<=3\*\*\*\s)(.*)(?=\s4\*\*\*)
Results in:
English 2 *** 3 *** English
Why? How can this be fixed?