Hi,

I think you need to anchor the whole expression:

(?x:
^(([a-zA-Z_]{1}[a-zA-Z0-9_]*:)|
([1-9]{1}[0-9]*))
)

(I have not tested this yet).

Maarten

> On 14 Jan 2024, at 11:32, Joaquin Adiego <jadi...@gmail.com> wrote:
> 
> Hi,
> 
> I'm developing a codeless language module for Boriel ZX Basic. Everything 
> works fine except the labels (which can be the old Basic line numbers, at the 
> beginning of the line, or an identifier ending with ':' also at the beginning 
> of a line).  I have used regular expressions to recognize all language 
> elements (see file attached). Numeric tags are recognized well (appearing in 
> green, see the screenshot attached), but text tags are not, recognizing 
> strings that are not at the beginning of a line as tags as well.  The two 
> regular expressions are similar, so I don't understand very well why it works 
> well in one case and doesn't work in the other.  I have tried rewriting the 
> regular expression in different ways but have not been successful, so I 
> deduce that the problem must lie in the module specification, but I am not 
> able to locate it.
> 
> Can anyone help me with this?
> 
> Regards
> 
> 
> 
> -- 
> 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/cf17d86a-e9dc-4851-bfb3-e82ae386008an%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/cf17d86a-e9dc-4851-bfb3-e82ae386008an%40googlegroups.com?utm_medium=email&utm_source=footer>.
> <Captura de pantalla 2024-01-14 a las 11.17.03.png><BorielBasic.plist>

-- 
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/C774B64C-14BE-4938-8125-FD04D73BA190%40xs4all.nl.

Reply via email to