-2
'Open Source man Is Pretty Brilliant'.match(/ ./)

'Open source man Is Pretty Brilliant'.match(/ ./, 9)

私はこれに従っています:http://rubymonk.com/learning/books/1-ruby-primer/chapters/5-strings/lessons/8-string-advanced

誰か説明してくれませんか、私には理解できません。

ありがとうございました。

4

1 に答える 1

1

僧侶ははっきり言います

When the second parameter is present, it specifies the position 
in the string to begin the search.

マスターは言います:

"I'm not pleased with your question at all. Its unclear and there is no proof of effort"

アップデート

'Open Source man Is Pretty Brilliant'.match(/ ./) #=> only one parameter
'Open Source man Is Pretty Brilliant'.match(/ ./, 9) #=> 9 is the second parameter.

マスターは言います:

"There's nothing equal to paying attention to what you read and what you practice. 
Outside this there is no Ruby, there is no Java"
于 2013-11-03T08:25:14.330 に答える