Displaying 4 results from an estimated 4 matches for "oregexp".
Did you mean:
regexp
2011 Aug 17
4
How to use Oniguruma in ruby 1.9.2?
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
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send...
2007 Aug 27
0
how can I get malformed UTF-8 characters to display properly?
..."Steel has that effect where you''d least expect it". The ''
character shows up as Õ when I use the method below, and the "d" is
just swallowed.
data.gsub!(/\323/, ''"'')
require ''oniguruma''
o = Oniguruma::ORegexp.new(''[^[:ascii:]]'')
# o = Oniguruma::ORegexp.new(''[^[:ascii:]]'', {:encoding =>
Oniguruma::ENCODING_UTF8})
chars = []
data.each_char{|c|chars << c}
chars.collect do |c|
if o.match c
begin
"&##{c.unpack('...
2008 Feb 03
4
Extract vowels and consonants using Ruby Regex
Hello,
I am trying to build a regex to extract vowels and consonants from a
string. So far, I am able to extract the basic a-e-i-o-u sequence
using the following extension to the String class:
class String
def vowels
scan(/[aeiou]/i)
end
def consonants
scan(/[^aeiou]/i)
end
end
examples:
>> "Mary had a little lamb".vowels
=> aaaiea
>> "Mary had a
2010 Feb 27
3
Oniguruma and Ultraviolet on Windows 7
Hi I have been tying to install the followings gems in order to add
code syntax highlighting to my application:
-Oniguruma
-Ultraviolet
-Harsh
Unfortunately I have been running into the the following errors when
running "gem install oniguruma ultraviolet"
Building native extensions. This could take a while...
ERROR: Error installing oniguruma:
ERROR: Failed to build gem