I try to match a specific string: \slash
only inside a given substring (in this case inside \lstinline{}
confined by brackets):
lorem \lstinline{Foo\slash Bar\slash Foo} ipsum but \slash here is okay
desired output is lorem \lstinline{Foo Bar Foo} ipsum but \slash here is okay
. See https://regex101.com/r/UgKvps/1
RegEx Flavour could be Python or any other really.