Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular expression of signed number #4

Open
AlirezaEbrahimkhani opened this issue Nov 1, 2020 · 1 comment
Open

Regular expression of signed number #4

AlirezaEbrahimkhani opened this issue Nov 1, 2020 · 1 comment

Comments

@AlirezaEbrahimkhani
Copy link

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

@andybalaam
Copy link
Owner

andybalaam commented Nov 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants