I have hundreds of text files with names like:
D14 J4N4-BAPN_633nm_20x_100%_30accu_10s_point 1 and D14 J4N5-NOBAPN_633nm_20x_100%_30accu_10s_point 3 as shown in the picture below:

I would like to select files which name contain BAPN as a group and NOBAPN as another group. But BAPN and NOBAPN contain the same characters as BAPN. How can I achieve this?
Simple regex aughta do what you're looking for:
(BAPN)|(NOBAPN)
can check it out here - regex101 BAPN
This will capture those exact strings as separate captures without overlapping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With