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;
In reply to Re: regex is not producing desired output
by ahmad
in thread regex is not producing desired output
by manishrathi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |