While I’ve used forward slash delimiters in the examples above, there are alter-native ways of defining regular expressions: you can specifically create a new Regexp object initialized with a string or you can precede the regular expression with %r and use custom delimiters - non alphanumeric characters - as you can with strings (see Chapter 3). In the example below, I use curly brace delimiters: