Tagged Questions
14
votes
5answers
5k 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
...
5
votes
2answers
237 views
Refactor highlight matched word in string
I have following method which highlight matched word in text:
...
4
votes
4answers
91 views
3
votes
1answer
140 views
Count comments and lines of code in ruby
Hi I wrote a small script as an answer for a stack overflow question, that counts lines of code and comments (in C and C++ style).
...
3
votes
1answer
133 views
filter out password in xml string
We're storing the xml communications with an external service in a text in the db and in a before_create I've got the following:
...
2
votes
3answers
2k views
Ruby code style / Regular Expression to remove blank lines / test case
Forgive me to put 3 seemingly irrelevant words in the subject line. But
they are the purposes of this post.
This is basically my first Ruby class, which is to remove all empty
lines and blank times ...
2
votes
2answers
223 views
Should I be using Regex to uppercase uncommon characters?
I've written a function for converting strings to upper case. It currently works by replacing each character using a Regex pattern with a hash:
...
1
vote
1answer
65 views
1-line conditional statement needs to be trimmed down
I have this conditional statement with use of regex:
...