I could not find a duplicate question.
I need to capture groups of period followed by a space.
But only those groups than are not preceeded by those two strings:
Zn and Zns.
I tested this:
[^Z][^n](\.\s)
https://regex101.com/r/ARZxAV/1
And this:
([^Z][^n]|[^Z][^n][^s])(\.\s)
https://regex101.com/r/cvEUKM/1
And this:
(?!Zn)(\.\s)
https://regex101.com/r/IUZeso/1
On this sample:
1) aaa. Zn. bbb
2) aaa. Zn. bbb.
3) aaa Zn. bbb.
4) aaa Zn. bbb
5) aaa Bns. bbb
6) aaa Bns. Bbb
7) aaa Zn. Aaa Bns. Bbb
8) 1
9) aaa
10) aaa.
11) aaa Abbb
12) aaa. Zns. bbb
13) aaa. Zns. bbb.
14) aaa Zns. bbb.
15) aaa Zns. bbb
How to capture only the a. , b. and s. (of the aaa. bbb. Bns. groups in the sample) groups from the sample above, excluding the Zn. and Zns. ?
Expected output from sample in bold:
- aaa. Zn. bbb
- aaa. Zn. bbb.
- aaa Zn. bbb.
- aaa Zn. bbb
- aaa Bns. bbb
- aaa Bns. Bbb
- aaa Zn. Aaa Bns. Bbb
- 1
- aaa
- aaa.
- aaa Abbb
- aaa. Zns. bbb
- aaa. Zns. bbb.
- aaa Zns. bbb.
- aaa Zns. bbb


non-regexformula forSheets:join()if you want all the output groups accommodated in single cellarrayformula style: