I am trying to match the inner-most content between @@BOKeyword-
and -End@@
in the following example:
@@BOKeyword-Here is@@BOKeyword-I want to match this!-End@@stuff-End@@
So my match would be: I want to match this!
I'm using the following regex: @@BOKeyword-([^@@BOKeyword--End@@]*)-End@@
However, this doesn't match at all. I developed this based on this example which I derived from a previous question's answer:
AC I want to match this! BD I don't want to match this! AC I want to match this! BD I don't want to match this! BD
Using the regex: AC([^ACBD]*)BD
And this works as expected. I think I'm misunderstanding how this works. Any tips would be appreciated! Thanks!
Note: I'm running this in Java.