Beginner gsub and ri questions


#1

How can I do a case-insensitive global substitution? Suppose, for
example, a string contained occurences of DOG, Dog, dog, and mistyped
dOg. I want every instance to be replaced by cat (without having to
test for each case permutation).

How can I generate a large text file containing all ri documentation
available on my system? I would like the topics to be in as logical an
order as possible, and in alphabetical order otherwise. I would like to
place a \r\n\f\r\n sepearater sequence between each topic.

Jamal


#2

“DOG” =~ /dog/i