Need help defining my own language
-
Hello, I’m trying to make my own language. It is for the text input for a specific program, where the number 1.00 has special significance. I would like to highlight it whenever it appears no matter the context. Sometimes it has a prefix (other numbers) sometimes it doesn’t.
Any clues on how to do this? I have tried putting 1.00 as operator 1, but it only works when it has something before, such as in 21.00, but not with 1.00
Thanks!
-
sorry not 100% clear to me, you only want to color 1.00 or 21.00 as well?
Cheers
Claudia -
I want to color 1.00 when it appears as 1.00 and also when it appears as xx1.00, being x anything. All instances of 1.00 regardless of context.
-
sorry, seems I wasn’t clear - I got that you want to color 1.00 - what I don’t know
is about the 21.00. Should the whole decimal be colored or only 1.00 and 2 being left
with the default color of the text.Cheers
Claudia -
Oh, sorry, maybe I misunderstood. It is the same, both will work for what I want to do.
Can you tell me how to do both, then I will pick what works better for the users?
-
ok - let me think about it - I guess this easy task isn’t easy solvable.
Cheers
Claudia -
sorry - but it looks like udl doesn’t support this at the moment.
The native workarounds I see are macro and mark feature from find dialog
or using style token feature but this involves manual execution.Cheers
Claudia -
OK, I will keep using the current version that highlights 1.00 when it has something immediately before. Thank you for your time!
-
Use Notepad++ with the RegEx Helper plugin.
Using in the plugin this expression “(\d{2,3}.00)|(1.00)”
the plugin will match and highlight things like 1.00 , x1.00 or xx1.00 anywhere in the current file. -
@Gogo-Neatza said:
Use Notepad++ with the RegEx Helper plugin
A downside there is that the RegEx Helper has to be manually activated upon every run of Notepad++, and that regex entered into its UI again. At least that my understanding of that plugin.
Seems like the OP would like something more “automatic”.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login