Andrew Timberlake wrote: > On Sat, Apr 18, 2009 at 9:35 AM, John Smith > <[email protected]> wrote: >> >> I'll appreciate any help. > > Use word break matches in your regular expression as follows: > > <string>.gsub(/\bcar\b/, 'bike') > > Andrew Timberlake > http://ramblingsonrails.com > http://www.linkedin.com/in/andrewtimberlake > > "I have never let my schooling interfere with my education" - Mark Twain
Thanks. What if I have...? "Lorem ipum car. Locar ipsum,<p>car lorem ipusum</p>.Lorem car ipsum. Lorem <a href='#'>car</a> ipsum." And now I want to obtain the same but I do not want to obtain <a href='#'>bike</a>, -- 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 email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

