From: 7stud -- Date: 2011-05-03T04:10:47+09:00 Subject: Re: Formatting a long regex: can a character class [] be split over lines? You could also use a here doc and avoid having to escape any character inside the string: str = <<'LOTS_OF_SYMBOLS' [A-Za-z\d!#$%&'*+-/=?^_`{|}~] LOTS_OF_SYMBOLS puts str.chomp --output:-- [A-Za-z\d!#$%&'*+-/=?^_`{|}~] -- Posted via http://www.ruby-forum.com/.