Hello Guys ,
Can anyone explain me how to use Oniguruma in ruby 1.9.2 , I guess in ruby 1.9.2 its a default library so there is no need to install externally?
I was using Oniguruma::ORegexp.new( in ruby 1.8.7 .
Thanks Nishant
Hello Guys ,
Can anyone explain me how to use Oniguruma in ruby 1.9.2 , I guess in ruby 1.9.2 its a default library so there is no need to install externally?
I was using Oniguruma::ORegexp.new( in ruby 1.8.7 .
Thanks Nishant
Hello Guys ,
Can anyone explain me how to use Oniguruma in ruby 1.9.2 , I guess in ruby 1.9.2 its a default library so there is no need to install externally?
I was using Oniguruma::ORegexp.new( in ruby 1.8.7 .
Onigurama is the regular expression engine for 1.9.x - /foo/ will use onigurama
Fred
So what are the changes i have make in my ruby 1.8.7 syntax to parse my regular expressions for ruby 1.9.2 , Can you provide me some kind of link.
So what are the changes i have make in my ruby 1.8.7 syntax to parse my regular expressions for ruby 1.9.2 , Can you provide me some kind of link.
I think it's all backwards compatible - your existing regular expressions should still work, but you now also have access to more features. Do you have any particular examples of things that aren't working as you expect?
Fred
I changed Oniguruma::ORegexp.new with Regexp.new
for example contents.to_s.gsub!(regular_expression, replace text) but it returns a nil value and does`nt seem to working as expected
like (<\/p>)\s+(<p>) for removing paragraph tags form the content
and i keep recieving this error message in the terminal
/home/user/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-2.3.11/lib/ active_support/dependencies.rb:406: warning: nested repeat operator + and ? was replaced with '*': /<li>(?:\s+)?(.*?)(?:\s+)?<\/li>/