search for: replace_with

Displaying 5 results from an estimated 5 matches for "replace_with".

2012 Sep 30
3
How to escape a forward slash with gsub, also does interpolation work with gsub?
I am trying this: I want to replace all the text in between java comments: /* start */ replace this text here /* end */ I''m trying: text.gsub(//* start */(.*)/* end *//im, replace_with) But i''m getting errors relating to expecting keyword_end. How should I be escaping /* and */ ? Also, does string interpolation work in gsub regex? Say I had variables like: start_tag = "/* start */" end_tag = "/* end */" I want to do: text.gsub("#{start_t...
2006 May 03
11
Curse words
Hello, I just had a problem with someone cusing on my rail app now is there somthing like Red Cloth that I can use to disable ''dirty words'' -- Posted via http://www.ruby-forum.com/.
2015 May 24
19
[RFC PATCH 00/11] Implement ARB_cull_distance
This patch series adds the needed support for this extension to the various parts of mesa to finally enable it for nvc0. Dave Airlie (1): glsl: lower cull_distance into cull_distance_mesa Tobias Klausmann (10): glapi: add GL_ARB_cull_distance mesa/main: add support for GL_ARB_cull_distance mesa/prog: Add varyings for arb_cull_distance mesa/st: add support for GL_ARB_cull_distance
2016 Nov 26
3
ifelse() woes ... can we agree on a ifelse2() ?
...d (or truncated) 'yes'. It uses 'rep' on the index and subsetting as a substitute for 'rep' on the value. It requires 'length' method that is compatible with subsetting. Additionally, it uses the same idea as dplyr::if_else, or more precisely the helper function 'replace_with'. It doesn't use 'rep' if the length of 'no' is 1 or is the same as the length of the result. For subassignment with value of length 1, recycling happens by itself and NA in index is OK. It limits 'NA.' to be of length 1, considering 'NA.' just as a label for...
2016 Nov 28
0
ifelse() woes ... can we agree on a ifelse2() ?
...39;. > It uses 'rep' on the index and subsetting as a substitute for 'rep' on the value. > It requires 'length' method that is compatible with subsetting. > Additionally, it uses the same idea as dplyr::if_else, or more precisely the helper function 'replace_with'. It doesn't use 'rep' if the length of 'no' is 1 or is the same as the length of the result. For subassignment with value of length 1, recycling happens by itself and NA in index is OK. > It limits 'NA.' to be of length 1, considering 'NA.' just as a...