`^` and `$` bind more tightly than `|`.
you want
```
^(s|(e?h?))$
```
On 10 Feb 2020, at 16:58, Tom Robinson wrote:
What have I missed here guys?
I want to match entire lines which are empty, contain a single
’s’, or contain ‘e’ and/or ‘h’ (in that order):
e
h
eh
s
ehs
he
x
The first 5 lines should match (including the empty line), last 3
shouldn’t.
But despite the caret anchor, my pattern is catching the ending of
unwanted lines:
^s|(e?h?)$
--
This is the BBEdit Talk public discussion group. If you have a feature
request or need technical support, please email
"[email protected]" rather than posting here. Follow @bbedit on
Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/1068812A-8CAC-4C07-94F6-E36B3CA756F7%40gmail.com.
--
This is the BBEdit Talk public discussion group. If you have a feature request or need
technical support, please email "[email protected]" rather than posting here.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/216D42D3-8604-4290-9A27-AE71F8822934%40munkynet.org.