You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validation is one great usage of regex in ruby but I use searching more often than validation and there must be others that could take advantage of expanding the scope of this project.
Would you be interested in expanding the scope of this project to search for the defined regex in a larger context as well as the current usage of validation of a string only containing the desired pattern?
Since the current regex for each locates each on a line by itself it seems as if having an option to locate them in a line would be helpful. Nesting regex is quite simple in ruby and could be used to keep it dry.
email=/([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w-]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)/iemail_validation=/^#{email}&/"this is my email: user@domain.tld"[email]=>"user@domain.tld""user@domain.tld"[email_validation]=>"user@domain.tld""this is my email: user@domain.tld"[email_validation]=>nil
I can propose more some samples and examples of usage if necessary. Obviously some thought has to be invested in organization and backwards compatibility.
Thanks for your consideration!
The text was updated successfully, but these errors were encountered:
That seems like a logical solution. What if we took this one step further and name them RubyRegex::Validate::Email and RubyRegex::Search::Email so that the namespace defines its usage and what it does. That way if we expand the project further we could possibly even have RubyRegex::Split::Email (not that one would split a string at every Email but you get the idea that there are other uses for regex). Then RubyRegex < RubyRegex::Validation so that the default remains backwards compatible. This would allow the user to override the default namespace.
Either way I would happy with it and would also be eager to assist.
Validation is one great usage of regex in ruby but I use searching more often than validation and there must be others that could take advantage of expanding the scope of this project.
Would you be interested in expanding the scope of this project to search for the defined regex in a larger context as well as the current usage of validation of a string only containing the desired pattern?
Since the current regex for each locates each on a line by itself it seems as if having an option to locate them in a line would be helpful. Nesting regex is quite simple in ruby and could be used to keep it dry.
I can propose more some samples and examples of usage if necessary. Obviously some thought has to be invested in organization and backwards compatibility.
Thanks for your consideration!
The text was updated successfully, but these errors were encountered: