How to establish a limit on the size of the message (maximum quantity of symbols)?

Hello,

He should limit the message length to 150 characters. I tried the Content Filter openfire plugin and entered the command : ^.{1,150}$ into the filter
However, I got an error, problem with syntax.