What does this statement mean?

I came across the following statement, where “input_string” is an string
that has been returned by “gets.chomp”:

if (line =~ /#{input_string}/)

What does this statement mean?

Thanks.

SW Engineer wrote in post #1168474:

I came across the following statement, where “input_string” is an string
that has been returned by “gets.chomp”:

if (line =~ /#{input_string}/)

What does this statement mean?

It creates a regex on the fly from content of input_string.

PS: Try it out in IRB.