Community Discussions and Support
Content control with \ and / characters

Thank you. Hans.  I'll try  that.

Gordon

 

<P>Thank you. Hans.  I'll try  that.</P> <P>Gordon</P> <P mce_keep="true"> </P>

I am puzzled.  I am trying to remove spam that is concerned with "watches", where the "w" is written as "\/\/" using forward and backward slash characters.  Using "obfuscation" doesn't seem to do the job in this case, so I have tried:

 if SUBJECT CONTAINS "\/\/atches" weight 51

However, that doesn't work either.  If I was trying to use a regular expression, I presume that I would need to "escape" the / character, but I thought that "CONTAINS" was quite literal.  What am I doing wrong?

Thank you

Gordon

 

<P>I am puzzled.  I am trying to remove spam that is concerned with "watches", where the "w" is written as "\/\/" using forward and backward slash characters.  Using "obfuscation" doesn't seem to do the job in this case, so I have tried:</P> <P><FONT size=1> </FONT>if SUBJECT CONTAINS <FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"\/\/</FONT></FONT></SPAN><FONT size=1>atches</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>51</SPAN></FONT></FONT></P> <P>However, that doesn't work either.  If I was trying to use a regular expression, I presume that I would need to "escape" the / character, but I thought that "CONTAINS" was quite literal.  What am I doing wrong?</P> <P>Thank you</P> <P>Gordon</P> <P><FONT size=1></FONT> </P>

I seem to have been able to do what I am looking for with:

if SUBJECT MATCHES "\*\*atches" weight 51 

However, I can't seem to find a way of "escaping" the "/" character.  The manual says that brackets can be used to define a special character literally, but I can't seem to get this to work with "/".  Can this be done?.

Thank you

Gordon

 

 

<P>I seem to have been able to do what I am looking for with:</P> <P>if SUBJECT MATCHES <FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN>"\*\*</FONT></FONT></SPAN><FONT size=1>atches</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN>"</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN>51</SPAN></FONT></FONT> </P> <P>However, I can't seem to find a way of "escaping" the "/" character.  The manual says that brackets can be used to define a special character literally, but I can't seem to get this to work with "/".  Can this be done?.</P> <P>Thank you</P> <P>Gordon</P> <P mce_keep="true"> </P> <P mce_keep="true"> </P>

I'm sorry to ask this again, but I imagine someone must know the answer.  Is it possible to escape the "/" character used in regex, for it to be interpreted literally?  If so, how?  It won't seem to work the same way as escaping "*" does, for example.  I've searched the site, the manual and the Internet and haven't found anything.  Apologies, if I missed it somewhere.

Thank you

Gordon

<P>I'm sorry to ask this again, but I imagine someone must know the answer.  Is it possible to escape the "/" character used in regex, for it to be interpreted literally?  If so, how?  It won't seem to work the same way as escaping "*" does, for example.  I've searched the site, the manual and the Internet and haven't found anything.  Apologies, if I missed it somewhere.</P> <P>Thank you</P> <P>Gordon</P>

Hi Gordon

You might try to repeat the escape character - which is "\" - like this:

if SUBJECT CONTAINS "\\/\\/atches" weight 51

Hope this helps,

Hans

<P>Hi Gordon</P> <P>You might try to repeat the escape character - which is "<B>\</B>" - like this:</P> <P style="COLOR: #007000"><STRONG>if SUBJECT CONTAINS "</STRONG><A><STRONG>\\/\\/atches</STRONG></A><STRONG>" weight 51</STRONG></P> <P>Hope this helps,</P> <P>Hans</P>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft