Top Level Namespace
Defined Under Namespace
Modules: ApplicationCable, ApplicationHelper, Validations Classes: AdminController, ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, Asset, AssetsController, Client, ClientsController, Folder, FoldersController, HelpController, HomeController, InformAdminJob, InformUserJob, Poll, PollsController, Satisfaction, SatisfactionsController, SharedFolder, SharedFoldersController, Survey, SurveyClientJob, SurveysController, User, UserMailer, UsersController
Instance Method Summary collapse
-
#build_and_extract(str, type, mel_reg) ⇒ Object
generic research function note ( and ) in the regexp string are necessary for the email to be element 0 of the returned ‘matchdata’ array.
Instance Method Details
#build_and_extract(str, type, mel_reg) ⇒ Object
generic research function note ( and ) in the regexp string are necessary for the email to be element 0 of the returned ‘matchdata’ array
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/validations.rb', line 68 def build_and_extract(str,type,mel_reg) valmel="" exp = Regexp.new("#{type}: (#{mel_reg.source})") # to debug #exp.match(str).captures.each do |e| # puts (e) #end if a = exp.match(str) valmel=a.captures[0].to_s #puts(valmel) end valmel end |