\d{1,3} matches a sequence of 1 to 3 digits so it will match 1, 12, or 123. 

If you specify a single number in the braces then it will match only that 
number of digits. \d{3} will match 123, 231, etc.

If you want to match all numbers longer than three digits you can use \d{3,}. 
This will match 123, 1234, 12345, etc.

Note that \d{3} will still match the start of 1234. You can add word boundaries 
\b\d{3}\b to correct for this.

[fletcher]


> On May 14, 2023, at 9:29 AM, 'Andy Nickless' via BBEdit Talk 
> <bbedit@googlegroups.com> wrote:
> 
> Something that I've been unable to find out is how to skip searching 
> something which already contains a simple pattern:
> For instance, to find a number consisting 1-3 digits I use (\d{1,3}) - but 
> how can I AVOID a number of up to 3 digits?
> Thanks in advance -
> Andy
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "supp...@barebones.com" 
> 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 bbedit+unsubscr...@googlegroups.com 
> <mailto:bbedit+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/4455d2a7-6efe-4183-903e-ea1baa8e091dn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/4455d2a7-6efe-4183-903e-ea1baa8e091dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/8616D19E-A8C4-4EE8-850F-31AA493EE395%40cumuli.com.

Reply via email to