Q:

Regular expression exception for text in start and end characters

I was searching regular expression in php but I didn't found it.
I have string: 
<font size=4>This is size in text</font>
I need insert any character on start and end of text "size", but only "size" in text. Not on <font size=4>. 
For example I insert "!"  <font size=4>This is !size! in text</font>
Exist some exception for text in start and end characters "<>" ?
I wrote some regular expression
\>([^>]+)(size)\<
but this is not working. I get two matches when string is <font size=4>This is in size</font>. But it isn't good because "size" can't be at any position
Someone help me ?
Thanks.

A:

Try this regex:
\bsize(?= )

Check: https://regex101.com/r/nB1wP4/1

