search for: regexp

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

Did you mean: regex
2015 Apr 05
4
[LLVMdev] Format of special case list for sanitizers
...the sanitizer 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
7
Differences between assert_tag and assert_select
...lt;a href="#" onclick="new Ajax.Request('http://test.host/admin/parties/phone/new', {asynchronous:true, evalScripts:true, parameters:Form.serialize('phones_head')}); return false;">Add new</a> # Succeeds: assert_tag :a, :attributes => {:onclick => Regexp.new(Regexp.escape(new_phone_url))}, :content => /add new/i # Fails assert_select "a[onclick=?]", Regexp.new(Regexp.escape(new_phone_url)), /add new/i test_link_to_add_address_exists(NewPartyViewTest) [/home/francois/src/config/../vendor/rails/actionpack/lib/action_controller/asse...
2002 Nov 11
0
Regular Expression support
I have added regular expression support using a POSIX implementation. The patch (against 2.5.5) is attached. The implementation is simple and follows the same mechanism that is implemented for normal searches. I added these command line arguments: --rexclude=PATTERN exclude files matching regexp PATTERN --rexclude-from=FILE exclude regexp patterns listed in FILE --rinclude=PATTERN don?t exclude files matching regexp PATTERN --rinclude-from=FILE don?t exclude regexp patterns listed in FILE In order to follow the previous format, the following will also work: --include "...
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 @@ -2...
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 r...
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]|[1...
2012 Nov 09
2
Creating yyyymm regexp strings on the fly for aggregation.
...ing the function: groupingStrings(2004:2006, 1:3) [1] "200401|200402|200403" "200501|200502|200503" "200601|200602|200603" This would yield first quarter matches for the years 2004 through 2006. My plan was to use both splitIt and groupingStrings to be able to create regexps all quarters. In addition I want it to be flexible enough for me to be able to create matching regexps for monthly, quarterly, semi-annually and annual regexps. One more example. Suppose I wanted to look at data semi-annually for 2010 through 2011. The regexps would be: "201001|201002|201...
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 does not match QPCCCMR1.csv does not match QPCCCMR9 match...
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 th...
2007 Sep 18
10
Routes
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
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 to this group, send...
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: webma...
2006 May 10
8
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 http://www.ruby-forum.com/.
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...
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 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...
2006 Feb 21
2
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-exchange.com/Web/Web_Langua...
2008 Nov 29
2
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
2
help with RewriteRule regexp
...have found 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 Sep 21
18
[PATCH v2 00/18] Replace many more uses of the Str module with PCRE.
v1 was here: https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html 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 rea...
2017 Feb 23
1
help with RewriteRule regexp
...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 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...