Reputation:
I want to get all lines which :
or
i get all lines which begin with '- '
by r"^- .*"
and all lines which contains '=' or '<' or '>' by .*[=<>]
but i don't know how to combine the expression.
You find my example here: https://regex101.com/r/pUk3qM/4/
Upvotes: 0
Views: 40
Reputation: 257
You can use (^- |[=<>])
if you don't care about the match - just need to know whether the whole line matches or not.
If you actually do need to match the whole line, you can use ^(- |.*[=<>]).*$
instead
Upvotes: 1