Ask a Question related to Ruby, Design and Development.
-
Damphyr #1
using variables in regular expressions
Being lazy, forgetful and generally very bad with regular expressions
leads me to post this question:
How can I use the contents of a variable as a pattern in a regular
expression?
I get a list of files from a set of paths and I want to do the following
repo=list_files paths
repo.collect!{|entry|
entry.gsub(/{variable_with_the root_I_want_to_substitute}/,"")
}
pretty straightforward no?
V.-
__________________________________________________ __________________
[url]http://www.freemail.gr[/url] - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου.
[url]http://www.freemail.gr[/url] - free email service for the Greek-speaking.
Damphyr Guest
-
Regular Expressions help...
Using regular expressions, I want to negate an entire word instead of characters, for example this would match any word that doesn't have the... -
Regular Expressions :(
Hello all! I was trying to write down a function to remove all the bbcode tags from a post before showing it (non in the phpbb, in another... -
RE : Regular expressions
Actually, I have to test two conditions to get into a block, If the strings found are either "one two" or "two three", go ahead. if ($text =~... -
PHP regular expressions
Hello, I am writing an elearning software with php. I need a script to recognize any inut of the type ab,aabb,aaabbb,aaaabbbb..... And so on.... -
[PHP] Q on Regular Expressions
* Thus wrote jsWalter (jsWalter@torres.ws): have you looked at strtotime()? http://php.net/strtotime The Date formats it can find are defined...



Reply With Quote

