[#19261] lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@...

なかだです。

29 messages 2003/01/01
[#19360] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "K.Kosako" <kosako@...> 2003/01/15

nobu.nakada@nifty.ne.jpさんの

[#19361] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/15

なひです。

[#19364] Re: lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@... 2003/01/17

なかだです。

[#19366] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/17

なひです。

[#19299] [BUG] errno == 0 — Kazuhiro Yoshida <moriq@...>

もりきゅうです。win32だけかもしれません。

22 messages 2003/01/04
[#19301] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19302] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19303] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19304] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19306] Re: [BUG] errno == 0 — nobu.nakada@... 2003/01/05

なかだです。

[ruby-dev:19410] [] 内での \001 のマッチ

From: WATANABE Tetsuya <tetsu@...>
Date: 2003-01-22 06:08:40 UTC
List: ruby-dev #19410
渡辺哲也です。

ruby 1.8.0 (2003-01-21) [i686-linux]

で

正規表現として

/[\001]/

という書きかたが通らないのです。

お試しスクリプト
------------------------------
str = "\001\002\003\004"
p str

str.gsub(/[\001\002\003\004]/) {|x|
  p x
}
------------------------------

実行結果 1.8.0
------------------------------
$ ruby re-1.8.rb
"\001\002\003\004"
------------------------------

実行結果 1.7.3
------------------------------
$ ruby-1.7.3 re-1.8.rb
"\001\002\003\004"
"\001"
"\002"
"\003"
"\004"
------------------------------

/[\001\002]/ という書き方はできなくなっ
たのでしょうか?

------------------------------
$ irb
irb(main):001:0> str = "\001\002"
=> "\001\002"
irb(main):002:0> str =~ /[\001]/
=> nil

$ ruby-1.7.3 =irb    
irb(main):001:0> str = "\001\002"
=> "\001\002"
irb(main):002:0> str =~ /[\001]/
=> 0
------------------------------

In This Thread

Prev Next