in reply to Re^4: regex to return line with name but not if it has a number
in thread regex to return line with name but not if it has a number
Thanks this does help! Your example above and using the following regex tester has really helped: https://regex101.com. I do have one question for you or anyone as I've been doing a lot of reading and I think I've found a simpler way to do what I want. How can I match a hyphen followed by a name with a regex? I have the following code that doesn't match. If I add an or "|" between the statements I do match but I don't want an or, I want and and.
(?:^-)(?=[A-Z]'?[-a-zA-Z]+$)
|
|---|