Concept Flow - Match operator (=~)
Start
Evaluate left operand (string)
Evaluate right operand (regex)
Apply =~ operator
Check if regex matches string
Return index
End
The =~ operator checks if a regex matches a string and returns the index of the match or nil if no match.