Reputation: 1990
I would like to match different things, and add condition that these matches must be between specific boundaries,
This is the text
protocol SceneDisplayView {
func displayEmailScreen()
func displayPasswordScreen()
func displayNameScreen()
}
What i did so far is find my matches, using this regex:
(?:^\s*func\s(display\w*)\(\)$)
This will end as the following :
as seen here in the demo: https://regex101.com/r/IuQ7nO/1/
I'm trying to limit these matches that they must be between protocol ... {
and closing bracket }
so that if there's any floating match outside of these boundaries, they would not show up, how could this be achieved with one regex ?
Upvotes: 1
Views: 141