Which Regular Expression's engine are you recommend for Keyboard Maestro?

I edited your post to put your data in Code Block:

image

Please always use a Code Block to show your data so that all special characters like TAB and SPACE are retained.

I'm still having a hard time understanding you.
It would greatly help if you would always:

  1. Show your real-world source text in a Code Block.
    • Include multiple examples if needed to cover all of your use cases.
  2. Show the desired results, also in a Code block.
  3. While I would prefer RegEx101.com, if you use RegExRX, please save the snippet file, and upload in a Zip file so that it is easy and clear for us to use.