in reply to regex is not producing desired output

Because you're telling the regex engine to match a line that contains the word 'is' only.

^ stands for a beginning of a line, while $ stands for the end of a line.

so unless you have a line that contains only 'is' it won't match

Your regex is better written as /\bis\b/are/g;

  • Comment on Re: regex is not producing desired output

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.