I have a cases where I need to extract anything in between multiple hyphens together. For example
------- General Data ------------------------------------------------------------
O/p: General Data
------- Protocol and Sequence Data ----------------------------------------------
O/p: Protocol and Sequence Data
------- Start Check Data - (before measurement - may be cached data) ------------
o/p: Start Check Data - (before measurement - may be cached data)
I have used this particular regex to try and achieve it
(?<=-)[^-]+(?=)
but this regex is able to get the first 2 cases correctly but not the 3rd case example. It matches the 3rd case but it only displays, for example for
------- Start Check Data - (before measurement - may be cached data) ------------
it gives o/p Start Check Data instead of the whole thing