I am using the Disable Messages module to disable one of the message which is being displayed to the end user. The message is:
Anonymous (not verified) has requested to be your Friend. View your pending friend requests to approve or decline.
To achieve this I have configured the module and written a regular expression to match a word from the message, But it seems to not be working.
Here is the code:
str.matches("(?i)(^|\\s+)(Anonymous (not verified))(\\s+|[.?!]$)");