lib/app42/base/constants.rb in app42-0.6.0 vs lib/app42/base/constants.rb in app42-0.6.1
- old
+ new
@@ -26,11 +26,12 @@
FLAVOUR_TYPE = ['light', 'medium', 'heavy']
DATABASE_NAME_NOT_ALLOWED = %w(mysql couchdb mongodb postgresql database sql)
# regex for special character
- SPECIAL = "?<>',?[]}{=-)(*&^%$#`~{}@ .+!_/"
- REGEX = /[#{SPECIAL.gsub(/./){|char| "\\#{char}"}}]/
+ SPECIAL = "?<>',?[]}{=-)(*&^%$#`~{}@ .+!_/"
+ REGEX = /[#{SPECIAL.gsub(/./){|char| "\\#{char}"}}]/
+ URL_REGEX = /(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/
# regex for special character (Database Name)
DBNAME_SPECIAL = "?<>',?[]}{=-)(*&^%$#`~{}@ .+!/"
DBNAME_REGEX = /[#{DBNAME_SPECIAL.gsub(/./){|char| "\\#{char}"}}]/
\ No newline at end of file