search for: regexp

Displaying 20 results from an estimated 838 matches for "regexp".

Did you mean: regex
2015 Apr 05
[LLVMdev] Format of special case list for sanitizers
...itizer special case list format[0] says, > The meanining of * in regular expression for entity names is different - it is treated as in shell wildcarding. In SpecialCaseList::parse, we see that this is just replacing * with .*: // Replace * with .* for (size_t pos = 0; (pos = Regexp.find("*", pos)) != std::string::npos; pos += strlen(".*")) { Regexp.replace(pos, strlen("*"), ".*"); } This seems to introduce more problems than it solves, since (i) this doesn’t really behave like a shell globbing wildcard as advertised,...
2007 Jan 24
Differences between assert_tag and assert_select
...ick="new Ajax.Request('', {asynchronous:true, evalScripts:true, parameters:Form.serialize('phones_head')}); return false;">Add new</a> # Succeeds: assert_tag :a, :attributes => {:onclick =>}, :content => /add new/i # Fails assert_select "a[onclick=?]",, /add new/i test_link_to_add_address_exists(NewPartyViewTest) [/home/francois/src/config/../vendor/...
2005 Aug 21
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 @@ -2...
2009 Nov 20
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/ To unsubscribe from this group, send em...
2006 Jun 05
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]...
2006 Feb 08
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 =,"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 does not match QPCCCMR1.csv does not match QPCCCM...
2003 Nov 27
ENUM regexp replacements
Anyone succeeded in using regexp replacements in ENUM, like "!\\+421257296(.*)$!sip:2\\!" 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 th...
2007 Sep 18
hi all, I want to move some routing tasks out of the router and into the controller. The goal is to make Merb feel less like mod_rewrite and give the user more control at the controller. The new Router is simple: it takes the path_info (not the whole request) then outputs a controller class and some parameters from the path matching. The rest of the routing would be done at the controller level.
2007 Jun 27
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this...
2006 May 10
E-mail validtor??
Does anyone have a good working e-mail validator? or even some regexp to make the validates_format_of work right... that would be awesome. Also, maybe an online tutorial for regexp. i''ve always been afraid of it but i think it''s time to face the fears. thanks! -- Posted via
2017 Feb 22
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: webma...
2017 Sep 21
[PATCH v2 00/18] Replace many more uses of the Str module with PCRE.
...tps:// This is a more complete evolution of the earlier patch. It replaces most important uses of Str with PCRE throughout the code. It also extends the bindings with some useful features like case-insensitive regexps. The main places I *didn't* touch are the generator (GObject uses Str extensively); and common/mlstdutils which cannot use PCRE because it cannot depend on C code. But pretty much everything else has been converted now. - - - Same question as before: > I wonder if there was a deep...
2006 Feb 21
validates_format_of :url, regexp?
Hey, Does anybody have a regexp for validating URLs? I found this one and am trying to adapt it: ^(((ht|f)tp(s?))\:\/\/)?(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk)(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\;\?\''\\\+&%\$#\=~_\-]+))*$ (http://www.experts-exchang...
2006 Apr 07
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 this since it parses the brackets differently, i've also tried to do it like: exten => _X.,1,GotoIf($[${EXTEN} : 234\[2-6\]]?jump:) but of cour...
2008 Nov 29
Using grep() to subset lines of text
I have two vectors, a and b. b is a text file. I want to find in b those elements of a which occur at the beginning of the line in b. I have the following code, but it only returns a value for the first value in a, but I want both. Any ideas please. a = c(2,3) b = NULL b[1] = "aaa 2 aaa" b[2] = "2 aaa" b[3] = "3 aaa" b[4] = "aaa 3 aaa"
2017 Feb 23
help with RewriteRule regexp
...und that now the RewriteCond is 'recommended' to be changed to: > > RewriteCond %{SERVER_PORT} !=443 > > But I have not found how to test for a string in the URL in the > RewriteRule. > > > On 02/22/2017 10:02 AM, Robert Moskowitz wrote: >> 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 e...
2017 Feb 23
help with RewriteRule regexp
...obvious to me (unless Apache regex is different from grep). ----- Original Message ----- From: "Leroy Tennison" <leroy at> To: "centos" <centos at> Sent: Thursday, February 23, 2017 10:15:54 AM Subject: Re: [CentOS] 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\.&quo...
2006 Aug 10
Major security vulnerability in the latest Rails 1.1.5
Hi, I think there is still a major vulnerability exists in the latest Rails 1.1.5. The problem is in the routing.rb file and safe_load_paths method. Because of the erroneous regexp it is possible to perform a DOS attack on any rails application. To reproduce: 1. start your application 2. use this url: http://localhost:3000/debug Routing module will load standard debug.rb script which stops a dispatcher process waiting for a terminal input. Actually this way it i...
2007 Jul 13
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....
2007 Dec 03
pcre vs. regexp for Postfix checks
What are your opinions on pcre vs regexp for header_, body_, and mime_checks in Postfix? I looked at the regexp_table and prce_table man pages, and see almost no difference other than the available flags. Miark