I try using the following to search some text and replace it by some other text starts with #. On regex101 it works fine but NotePad++ says search failed. Also tried to add \r before \n but didn't help.
regex: (class boy(?:.*\n)+\s*)(Height.*;\n)((?:.*\n)+})
Text to search:
class boy Mike
{
Age = 20;
PhoneNum = 658965;
Height = 198;
City = LA
}
note boy Joe
{
Age = 21;
PhoneNum = 558565;
Height = 178;
City = BA
}
class boy Joe
{
Age = 21;
PhoneNum = 558565;
Height = 178;
City = BA
}
Substitute:
$1#$2$3
Output:
class boy Mike
{
Age = 20;
PhoneNum = 658965;
#Height = 198;
City = LA
}
note boy Joe
{
Age = 21;
PhoneNum = 558565;
Height = 178;
City = BA
}
class boy Joe
{
Age = 21;
PhoneNum = 558565;
#Height = 178;
City = BA
}

