On 4/3/07, Fletch <[EMAIL PROTECTED]> wrote:
> Thanks for your replies,
> The date guide was really good, but as it is only a String comparison, I did 
> not want to over complicate the code.
> I have also tried the other two suggestions, and have still not been able to 
> get the match to work.
> I think that I might have to use an escape. I have tried the CGI.escape which 
> works quite well, and picks up the / character by converting it to a %2F, but 
> to use this method is overkill really as it is designed for all HTML 
> characters, so I am thinking that I just need a simple line of code to 
> replace all instances of / with %2F
>

Now that's crazy talk.  :)  Seriously, look at this code:

################################
arr_date = "xxx01/01/07xxxx"

if arr_date =~ /01\/01\/07/
  puts "got a regex match"
  end
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to