cell icon indicating copy to clipboard operation
cell copied to clipboard

Regular expression of signed number

Open AlirezaEbrahimkhani opened this issue 5 years ago • 1 comments

Hi ... Thank you for your clean and excellent code

But the Regular expression you wrote for numerals does not support signed numbers

Can you help me write Regular expression for signed number ?

Your Regex [.0-9]

Thanks

AlirezaEbrahimkhani avatar Nov 01 '20 09:11 AlirezaEbrahimkhani

Hi @AlirezaEbrahimkhani - thank you for your message!

To write a regex that allows a minus sign, you have to write the minus sign first, so this should do it: [-.0-9]

However, to make negative numbers work in Cell you would need a few more things (including documentation updates!) - if you want to work on it, feel free, and let me know how you get on. If it's simple, I might add it, and if not, I might add it to Pell instead...

Also, please note that Cell has moved to https://gitlab.com/cell_lang/cell so it would be better to work on it there.

andybalaam avatar Nov 02 '20 11:11 andybalaam