Hi is it possible to use regex for numbers? Because in the scripting language PAWN you can write 1_000_000 instead of 1000000. But because of the '_' the number will not be recognized as a number. Is it somehow possible to do something like this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't fully understand your question, but you could search for [0-9] to find a single digit. See http://notepad-plus.sourceforge.net/uk/site.htm for notes about Notepad++'s regex support.
The expression [0-9_]+ will match something like 100 or 1_000. It gets more complicated if you also want to avoid matching the 1 in x1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I completely misunderstood the question. I doubt you can fix it, but I don't know for sure. I've never come across a language where you can do that before (not knowingly, anyway). I guess you could just remove the underscores - they're optional, aren't they?
Other than that, I think it would be a programming job.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, I just entered some numbers into a file set to C language, and it made 1_000_000 all red. It seems like it knows to treat underscores as digits for some languages. It doesn't do it for VB, so it's language specific. No idea whether this is configurable or is hard coded.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi is it possible to use regex for numbers? Because in the scripting language PAWN you can write 1_000_000 instead of 1000000. But because of the '_' the number will not be recognized as a number. Is it somehow possible to do something like this?
I don't fully understand your question, but you could search for [0-9] to find a single digit. See http://notepad-plus.sourceforge.net/uk/site.htm for notes about Notepad++'s regex support.
The expression [0-9_]+ will match something like 100 or 1_000. It gets more complicated if you also want to avoid matching the 1 in x1.
I know how to write regex.
but my problem is with syntax highlighting. 1_000_000 is black instead of blue( color of the number) same goes with 0x015
Sorry, I completely misunderstood the question. I doubt you can fix it, but I don't know for sure. I've never come across a language where you can do that before (not knowingly, anyway). I guess you could just remove the underscores - they're optional, aren't they?
Other than that, I think it would be a programming job.
Actually, I just entered some numbers into a file set to C language, and it made 1_000_000 all red. It seems like it knows to treat underscores as digits for some languages. It doesn't do it for VB, so it's language specific. No idea whether this is configurable or is hard coded.