similar to: Removing a block of text within a string

Displaying 20 results from an estimated 9000 matches similar to: "Removing a block of text within a string"

2016 Aug 08
2
Trouble applying regex to dialplan variable that contains double-quotes
I am writing a dialplan context under asterisk 11.21.0 to handle SIP message routing between registered SIP peers using chan_sip. I am having trouble with double-quotes when the source peer uses a display name, which appears in quotes before the SIP URI. I want to extract the SIP URI from MESSAGE(from) in order to (conditionally) route a failure message back to the source peer. My test dialplan
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
2006 Aug 08
8
RESTful Rails Plugin
I am following the instructions on how to use RESTful Rails plugin found at http://www.xml.com/pub/a/2006/04/19/rest-on-rails.html?page=3. When I run the rake test:functionals I get the following error message: rake aborted! undefined method `first'' for :book:Symbol (See full trace by running task with --trace) How can I fix this problem? I am using Rails 1.1.4 version. TIA
2006 Jul 28
2
string replacement?
Hello, What is the best method to replace a substring within a string? I''m trying this: url.gsub(string_to_replace,replacement) but i get the following error: undefined method `rewrite'' for #<String:0x3711a58> -- Posted via http://www.ruby-forum.com/.
2020 Jan 30
3
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
Interesting, so I guess we can check for whether it's an array type and adjust accordingly instead? Blocking *all* global variables without definitive initializers feels a bit much to me, especially if they have primitive types (i.e. integers) that don't have the potential to be screwed around with like this. On Wed, Jan 29, 2020 at 8:14 PM George Burgess IV < george.burgess.iv at
2020 Jan 29
2
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
In this function (used to check the size of a global) there is an initial check for whether the initializer to this function is "definitive." My question is: why do we need this? How does the object's size change if a global's initializer is defined at link time? Thanks, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 May 05
3
Only partially reading a page!
I am trying to get a page which includes a form, but the form is missing from the WWW::Mechanize::Page object. I retrieve it via: page = web_agent.submit(a_different_form) For debugging this problem, I then immediately write the resulting page to two different logs: File.open(''big.html'',''wb'') { |f| f.write(page.body) }
2012 Apr 26
3
[PATCH 1/3] gobject: NFC generated code formatting fix
--- generator/generator_gobject.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/generator_gobject.ml b/generator/generator_gobject.ml index e4c175b..48ddbf0 100644 --- a/generator/generator_gobject.ml +++ b/generator/generator_gobject.ml @@ -391,7 +391,7 @@ let generate_gobject_optargs_source name optargs flags () = pr "G_DEFINE_TYPE(%s, guestfs_%s,
2006 Aug 04
0
Hard break broken in 3.0.4?
Is :hard_break working in RedCloth 3.0.4? $ ruby -v ruby 1.8.4 (2005-12-24) [i686-linux] $ pwd /lib/ruby/gems/1.8/gems/RedCloth-3.0.4/lib $ irb irb(main):001:0> require ''redcloth'' => true irb(main):002:0> rc = RedCloth.new("h1. Heading\n\n_Not_ heading.") => "h1. Heading\n\n_Not_ heading." irb(main):003:0>
2006 Jun 01
3
Webtrends For Rails ???
Is there any tools that is similar to Webtrends that can be used with Rails based Web sites? TIA http://www.ProblemSolvingSkill.net Hone your problem-solving skills
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
2002 Oct 18
4
code to turn T into TRUE
Does anyone have code that will methodically process R sourcecode, turning T's into TRUE and F's into FALSE? I got bored doing this by hand, after the first 30-odd functions-- there are hundreds left to do. I don't want to simply deparse everything, because that would destroy my beautiful formatting. The reason it's not trivial, is that comment lines, quotes, and split lines need
2006 Jun 28
20
Rails Vs JBoss Seam
I have been frustrated with J2EE technology just like any other developer who has worked in that technology for a long time. This made me learn about Rails and I was excited about RoR. Today I came across JBoss Seam framework and I am not able to contain my excitement. My passion for JEE development is back. It seems like it is better than RoR. I would like to hear differnt opinions about this
2015 Sep 12
1
[PATCH] v2v: fix provides list whitespace trim
Tabs should not be doubly-escaped in regexp. Signed-off-by: Shahar Lev <shahar@stratoscale.com> --- v2v/convert_linux.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index adbcaa2..1e9e689 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -581,7 +581,7 @@ let rec convert ~keep_serial_console (g : G.guestfs)
2006 Oct 12
7
Evil Scaffold
I read the Amy Hoy''s presentation on why scaffold is not a good thing for beginners. For admin application, is it ok to use scaffold? --~--~---------~--~----~------------~-------~--~----~ 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
2006 Jan 27
9
RedCloth Hard Breaks
Has anybody gotten :hard_breaks to work with RedCloth? I''m doing: self.body_html = RedCloth.new(self.body).to_html(:textile) which works, except that it doesn''t transform hard breaks to <br /> tags, which is really important for me. However, if I do: self.body_html = RedCloth.new(self.body, [ :hard_breaks ]).to_html(:textile) then it converts ALL breaks into <br
2007 Dec 04
2
Bug: NoMethodError: private method `gsub'' called for nil:NilClass
Hi there. I''m using RedCloth as part of a social network''s blog system. I came across the following bug when an img tag with the src attribute is inputted, and filter_html is set to true. I have pasted the code sample below. >> require ''RubyGems'' => true >> require ''RedCloth'' => true >>
2017 Aug 23
4
Flummoxed by gsub().
On 23/08/17 18:33, Stefan Evert wrote: > >> On 23 Aug 2017, at 07:45, Rolf Turner <r.turner at auckland.ac.nz> wrote: >> >> My reading of ?regex led me to believe that >> >> gsub("[:alpha:]","",x) >> >> should give the result that I want. > > That's looking for any of the characters a, l, p, h, : . OK. I see
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
2006 Jul 29
2
Finding sum
# Get a list of product ids from a form, then # sum the total price product_list = params[:product_ids] total = Product.find(product_list).sum(&:price) I understand the first list line and part of the second line, but what does the & symbol mean? TIA.