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

Update regex to allow for whitespace before ln address #524

Merged
merged 3 commits into from
Jan 18, 2022

Conversation

secondl1ght
Copy link
Contributor

Closes #520, this was my first time trying regex so I am not 100% sure that this is correct. If it is wrong please let me know and I will go back and learn more about regex.

@bumi
Copy link
Collaborator

bumi commented Jan 16, 2022

here are some tools to inspect/debug regex:
https://www.debuggex.com/
https://rubular.com/

I think I'd do something like: (⚡️:?|lightning:|lnurl:)\s?(\S+@\S+) to not have the whitespace part of the match group and only have the lightning address in there.

and I think there are some more places where this is used. can you look for them also

@bumi
Copy link
Collaborator

bumi commented Jan 17, 2022

and don't forget to look for other occurrences of the regex

@bumi bumi merged commit f3df215 into getAlby:master Jan 18, 2022
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

Successfully merging this pull request may close these issues.

In the enhancements support a whitespace
2 participants