Project

General

Profile

how to encapsulate or escape string?

Added by Rega Fox 14 days ago

Hello.

How can I get a string of special characters to work in pattern matching, i.e:

if i want to trigger on: *_\/_*

The following says: -!- /if: insufficient parameters

on ^*:TEXT:*:#:{
  if (*_\/_*  isin $1)
  {
    echo true
  }
}


Replies (1)

RE: how to encapsulate or escape string? - Added by Per Amundsen 11 days ago

You don't need to escape characters in MSL, there are certain exceptions, in this case, you get an error because you have the { bracket on a separate line, it must be on the same line as the /if command, like this:

on ^*:TEXT:*:#:{
  if (*_/_*  isin $1) {
    echo true
  }
}
    (1-1/1)