I have one substring to be matched exactly at the beginning of source string. 

```
source_string = "This is mat. This is cat."

substring1 = "This is"

substring2  = "That is"

source_string.match(/^(#{substring1}|#{substring2})$/)

```

This is what I tried it should work like this, if exact '`This is`' or '`That is`' is there at the beginning of string it should match, doesn't matter what is there after those substrings in `source_string`. My code is giving `nil` even if `'This is'` is present.