Tagged Questions
4
votes
2answers
98 views
Refactor highlight matched word in string
I have following method which highlight matched word in text:
# Hightlight matched term
#
# Ex(for term: some):
# "<span class="bold">Some</span> CEO Event"
#
def ...
12
votes
6answers
3k views
Use of a regex stored inside yaml file
I installed settingslogic and in the configuration file I put the regex for the email as follows
#config/settings.yml
defaults: &defaults
email_regex: ...