similar to: Regexp#quote in request.rb

Displaying 20 results from an estimated 20000 matches similar to: "Regexp#quote in request.rb"

2008 Mar 26
2
Missing Method defined in controllers/application.rb
I have this in my controllers/application.rb: class ApplicationController < ActionController::Base ... def datebalk! # set regexp for datebalks generated attributes c = /.*__dteblk/ # Remove datebalks generated attributes from params hash delete_if { |k, v| c =~ k.to_s } end ... end When I call this from client_controllers.rb in this fashion: # need this to strip
2005 Aug 21
0
Patch for Element.Class - wrong regexp
Hello, I noticed (due to a recent post by Martin Honnen to clp) that Element.Class uses wrong regexps for its operations. E.g., Element.Class.has() will find "classA" in "classA-foobar" I also changed the interface of .has() to the more general one used in .has_any() --- util.js.old 2005-08-21 19:18:40.000000000 +0200 +++ util.js 2005-08-21 19:31:42.000000000 +0200 @@
2006 Feb 08
0
Stange regexp problem with case sensitivity
Environment: CentOS 4.2 (RHES4 clone) Ruby 1.8.4 Rails 1.0 I am having a small difficulty with case sensitive matching in some ruby code: f_nam_re = Regexp.new(f_nam_re_s,"x") produces these test results: The passed regexp: ^QPCCCMR[[:digit:]]$ The regexp used is: /^QPCCCMR[[:digit:]]$/i $= is false qpcccmr1 matches QPCCCMR1 matches QPCCMMR1 does not match qpCCCMR1 matches QPCCCMRC
2010 May 10
6
feedback on a few ActiveSupport::Multibyte patches
Hi all, In response to Rodrigo Rosas''s message about mb_chars.upcase not giving the expected result on 1.9, I''ve done some work in a fork to make String#mb_chars always return an instance of a proxy class, both with Ruby 1.8 and Ruby 1.9. The end result of the patch is (hopefully) to make Rails'' multibyte functionality behave the same way in 1.8.7 and 1.9.x.
2009 Nov 20
1
Gem/Plugin to Convert Ruby Regexp to Javascript Regexp?
Just a quick question or maybe a suggestion, is there a gem/plugin that will convert ruby regexp to javascript regexp? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2007 Apr 25
0
Redcloth bug - Stack overflow in regexp matcher
Hi, I''ve been using the rassmalog static blogging engine and have encountered a stack overflow inside the redcloth regexp matcher. I don''t seem to suffer this error on my Ubuntu (Feisty Fawn) box (with Ruby 1.8.4??), but I do get it on my Gentoo system. Running the following line will generate it (I''ve attached the YAML/redcloth file to this message). $ ruby -ryaml
2017 Feb 23
0
help with RewriteRule regexp
And it won't if 'http://webmail.domain' is the actual text, the ^ says "at the start of the line" (in other words, 'webmail\.' must start in character position 1). Choices: Remove the caret and accept the consequence that all references to "webmail\." will be changed or determine how to re-write (pardon the pun) the rule to narrow the scope to (such as)
2007 Aug 30
0
Why Regexp#freeze?
I notice in recent commits that a number of these have been added: /\[(\d+)\]/.freeze I thought that Regexps are immutable. Furthermore, Regexp literals don''t generate a new object each time they are encountered: irb(main):001:0> 3.times { puts /\d+/.object_id } -605707646 -605707646 -605707646 => 3 irb(main):002:0> Unlike strings: irb(main):002:0> 3.times { puts
2017 Feb 23
1
help with RewriteRule regexp
Hmmm, maybe I spoke too soon, why the second test didn't match isn't obvious to me (unless Apache regex is different from grep). ----- Original Message ----- From: "Leroy Tennison" <leroy at datavoiceint.com> To: "centos" <centos at centos.org> Sent: Thursday, February 23, 2017 10:15:54 AM Subject: Re: [CentOS] help with RewriteRule regexp And it won't
2003 Nov 27
2
ENUM regexp replacements
Anyone succeeded in using regexp replacements in ENUM, like "!\\+421257296(.*)$!sip:2\\1@stuba.sk!" I can't get it to work in ASterisk. I've added '\\1' and Debug echos "1" I've added '\\\\1' and debug echoes "\1", but regexp fails to work. The example above is from the nic.at presentation, I can't get it to work. /Olle
2017 Feb 22
2
help with RewriteRule regexp
My regexp skills are somewhere infinitesimally close to zero. I have never really 'gotten' them. That said, I have spent a couple hours already search for help to write a rewriterule that works on a string in the URL. In particular I want success if either of the following were provided: webmail.domain (e.g. webmail.foo.com) server/webmail (e.g. www.foo.com/webmail) And I have not
2017 Feb 22
0
help with RewriteRule regexp
Seems I left off one point in this message. This is to refine these rules in my Apache server. RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] I only want the rewrite if the URL includes webmail as I indicate below. I have found that now the RewriteCond is 'recommended' to be changed to: RewriteCond
2005 Aug 31
1
Processed: Re: [Pkg-nagios-devel] Bug#325874: nagios-common: logcheck regexp issue
Processing commands for control at bugs.debian.org: > reassign 325874 logcheck-database Bug#325874: nagios-common: logcheck regexp issue Bug reassigned from package `nagios-common' to `logcheck-database'. > tags 325874 + patch Bug#325874: nagios-common: logcheck regexp issue Tags were: patch Tags added: patch > thanks Stopping processing here. Please contact me if you need
2003 Nov 26
0
Question about Unix file paths (and proposal for new regexp class)
> Date: Wed, 26 Nov 2003 13:52:44 +0100 > From: Martin Maechler <maechler@stat.math.ethz.ch> > To: <Kurt.Hornik@wu-wien.ac.at> > Cc: <r-devel@stat.math.ethz.ch> > Subject: Re: [Rd] Question about Unix file paths > > > > >>>>> " Kurt" == Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> > >>>>> on Wed, 26
2006 Apr 07
1
regexp in gotoif
Hello! this is a short one: in a gotoif-statement i would like to match a variable to a number, where the number could have digits from 2-6. asterisk only seems to be capable to match such a digit-range when used in the extension, but not in a regexp, at least the following query doesn't work: exten => _X.,1,GotoIf($[${EXTEN} : 234[2-6]]?jump:) obviously asterisk has a problem with
2010 Apr 19
3
stupid regexp question
Hello, I have a stupid regexp question. I have a large data frame of strings. I would like to convert all occurences of : "W.m^{-2}" to "W/m2" I make the following test : gsub(glob2rx("W.m^{-2}"), "W/m2", "W.m^{-2}") but it does not seem to work. I don't know how to do it otherwise as I could never learn how to deal with the special
2006 Jun 05
5
Regexp - date validation
Can somebody tell me why the following RegExp doesn''t work for date validation in Rails... It validates fine in RadRails -- using REgExp panel. Intended format: (mm/dd/yyyy): %r{^(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])(-|/)(19|20)([0-9][0-9])$} If i try the following, it works in Rails: %r{(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])} When I add the last piece, it
2007 Jul 13
1
Regexp Question - Merb::Router
Hi, I''m looking through the Merb::Routing code and I''ve found a regexp that I can''t figure out how it works. Merb::Router::SECTION_REGEXP #=> /(?::([a-z*_]+))/ It takes a route definition string, like "/products/:model/:id" and extracts the "model" string on the first pass, and later the "id" string. Can anyone shed some light on
2011 Feb 16
5
validates_inclusion_of with range on ruby 1.9
I found out today that Range#include? behaves differently on 1.9 than on 1.8 ( http://rhnh.net/2009/08/03/range-include-in-ruby-1-9 ) In order to deal with various edge cases, instead of just checking whether range.first <= value <= range.last, in ruby 1.9 include? steps through all the values in the range, checking for equality. This is of course a lot slower - in my case, checking a date
2007 Jun 27
5
Regexp not matched
Sorry, meant to post this in the rails forum. Anyways, how would I write a rescue method to recover from a failed regexp parsing with error "regexp not matched" -Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post