Ruby on Rails
Tuesday, February 5, 2019
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 <fuge...@gmail.com> 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()?
https://docs.ruby-lang.org/en/2.3.0/String.html#method-i-sub
https://docs.ruby-lang.org/en/2.3.0/String.html#method-i- gsub
What makes you think that gsub needs any special hint to treat a multi-line string as a source of multiple matches? Show your work.
Walter
>
> --
> 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 emails from it, send an email to rubyonrails-ta...@googlegroups.com .
> To post to this group, send email to rubyonra...@googlegroups.com .
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .c9dcb4ae-c3fb-4932-868b- 4a2390295327%40googlegroups. com
> For more options, visit https://groups.google.com/d/optout .
I decided I don't want to gsub anything out but instead save a match to a variable That would be a different topic than gsub so should I start a new thread?
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 emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e0fbc7ed-be16-494f-99d7-46a68f7f2e81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment