in reply to Regex: Extracting the case insensitive string and printing on the output

i is for ignore case
remove i and then run
Edit:
$& can be used to get the matched pattern
  • Comment on Re: Regex: Extracting the case insensitive string and printing on the output