On Tuesday, February 5, 2019 at 8:33:03 AM UTC-5, Walter Lee Davis wrote:
>
>
> > On Feb 5, 2019, at 3:34 AM, fugee ohu >
> wrote:
> >
> > Does gsub have a global operator? How do I gsub in cases where there are
> multiple lines that need to be treated as a single string?
>
> What is the
> On Feb 5, 2019, at 3:34 AM, fugee ohu wrote:
>
> Does gsub have a global operator? How do I gsub in cases where there are
> multiple lines that need to be treated as a single string?
What is the difference between sub() and gsub()?
Does gsub have a global operator? How do I gsub in cases where there are
multiple lines that need to be treated as a single string?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving
On 10 August 2012 03:28, Alexander Farley li...@ruby-forum.com wrote:
I'm using the 'builder' gem. I create an XML builder, add a sequence of
tags with inner text, then escape the HTML, then save the object.
Problem: The following gsub tag is appearing in my XML that I didn't put
there.
gsub
I'm using the 'builder' gem. I create an XML builder, add a sequence of
tags with inner text, then escape the HTML, then save the object.
Problem: The following gsub tag is appearing in my XML that I didn't put
there.
gsub =amp;amp; =amp;quot; =amp;lt;
=amp;gt;(?-mix:[amp;\lt;gt;])/gsub
Can
yep. i didnt escape the string twice...so i just got confused with the
irb-way to show the string.
so i used gsub(/, ) and it worked.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this discussion on the web visit
hi,
im getting tired on this one.
i want to replace all forwardslashes with backwardslashes.
irb:
r = C:/RAILS/
r.gsub(/, \\) or r.gsub(/) {('\'} both give me:
C:\\RAILS\\
how can i use gsub to display only one \?
regards
--
You received this message because you are subscribed to the Google
On 23 March 2012 10:36, Aaron Schmitz a.schmitz...@googlemail.com wrote:
hi,
im getting tired on this one.
i want to replace all forwardslashes with backwardslashes.
irb:
r = C:/RAILS/
r.gsub(/, \\) or r.gsub(/) {('\'} both give me:
C:\\RAILS\\
how can i use gsub to display only one \?
thank younever thought about that..
next question! :D
when i put in mit shell : i_view32.exe C:\Rails\test.png
/convert=C:\Rails\test.jpg it works. but when i do
*system(i_view32.exe C:\Rails\test.png /convert=C:\Rails\test.jpg)*
it doesn't work.
what am i doing wrong?i guess it is escaping
On 23 March 2012 12:49, Aaron Schmitz a.schmitz...@googlemail.com wrote:
next question! :D
system(i_view32.exe C:\Rails\test.png /convert=C:\Rails\test.jpg)
doesn't work.
What happens when you try:
system(i_view32.exe C:\\Rails\\test.png /convert=C:\\Rails\\test.jpg)
?
--
You received this
= nil
i can start calc.exe from firefox via the controller that says *
system(calc.exe)*.
but i cannot start i_view32.exe or firefox.exe etc.
is it a permission issue on win xp?
the command is ok, i tested it in cmd.exe
--
You received this message because you are subscribed to the Google
On 23 March 2012 13:46, Aaron Schmitz a.schmitz...@googlemail.com wrote:
is it a permission issue on win xp?
the command is ok, i tested it in cmd.exe
Probably... I recommend a nice Linux install (even just a VM... ;-)
--
You received this message because you are subscribed to the Google
Does *system('i_view32.exe', 'C:\\Rails\\test.png',
'/convert=C:\\Rails\\test.jpg')* work for you?
On Fri, Mar 23, 2012 at 8:49 PM, Aaron Schmitz
a.schmitz...@googlemail.comwrote:
thank younever thought about that..
next question! :D
when i put in mit shell : i_view32.exe
Here's my code
def index
file = BLAH-ex201588.doc
@file_cut = order.gsub(/[\w [- ! # $ % ^ * = +]+]+\.doc$/,
'*.doc)
end
The code worked before when I was using Ruby 1.9.1, but now I'm using
Ruby 1.8.7 due to technical reasons. I would imagine that it should
still work, but I doesn't.
I think you should ask this in a Ruby forum. My one cent.
On 9 June 2010 14:37, anon_comp neocools...@gmail.com wrote:
Here's my code
def index
file = BLAH-ex201588.doc
@file_cut = order.gsub(/[\w [- ! # $ % ^ * = +]+]+\.doc$/,
'*.doc)
end
The code worked before when I was using
Hi guys: I'm trying go through a table, read a field, escape out all the
single quotes in there, and write it back again. For some reason my
gsub, even though by all accounts looks right, doesn't seem to be
working. Here is my code:
...
y.text.gsub(',')
thesql = text = '+y.text+'
hi ,
I have a string with \. how can i gsub the string?
i tried
\.gsub('\','')
but it is giving error.
thanks in advance
JK
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
17 matches
Mail list logo