Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon Content Filter > Content Filter Struggles

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon Content Filter  /

Content Filter Struggles

Trying to implement content filter to remove certain embedded link types using the following code:

See example 1 in screen shot

DEMO @ https://regex101.com/r/5COGWm/

The demo correctly locates all the I need for both single and multi spanning lines.

Assuming the application implements all the same syntax as the website I'm using for debugging, the last step is to add the options to this command (Global, Single Line and Multi line or gsm).

Example: See example 2 in screen shot

This command causes the application to through up a syntax error.

Is there a way to rewrite this command so I can capture the same items in the DEMO (https://regex101.com/r/5COGWm)?

Attachments:

Capture1.PNG (4 KB)


  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Tyler Davis - Jul 7, 2020 10:00 am (#1 Total: 6)  

Alt-N Technical Support  

Photo of Author
Tyler Davis
Frequent
Frequent
Posts: 259

MDaemon
RelayFax
SecurityGateway
Outlook Connector
SecurityPlus
ProtectionPlus
WebAdmin
When I plug your expression into MDaemon's Content Filter regular expression tester, there are no results. I went out to regexr.com or debuggex.com to verify further and the sample string in your link returns no matches there either.

I'm not able to post the string as plain text in the forum here without it editing the string, but I removed the left angle bracket, tested again, and started seeing matches. Perhaps this will work for you.

--
Tyler Davis
MDaemon Technologies
https://www.mdaemon.com

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion. MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
https://www.altn.com/Support/RequestSupport/
---------------------------------------------------------------------

[Last Editor: Tyler Davis, Jul 7, 2020 1:26 pm. Total Edits: 2]

Replies to this message
  • Scott Trowbridge (Jul 8, 2020 8:14 am)


  • Scott Trowbridge - Jul 8, 2020 8:14 am (#2 Total: 6)  

     

    Photo of Author
    Scott Trowbridg…
    Newbie
    Newbie
    Posts: 11
    Replying to: Tyler Davis (Jul 7, 2020 10:00 am)
    When I plug your expression into MDaemon's Content Filter regular expression tester, there are no results. I went out...

    I added the "Regular Expression" and "Test String from the posted example at (https://regex101.com/r/5COGWm/1) into the "Search and Replace Tester" then, per your instruction, removed the left most "/"; the system did not return any results (see attachment).

    The URL example works, Mdaemon doesn't see any results. What's wrong?


    Untitled

    Scott Trowbridge - Jul 20, 2020 12:42 pm (#3 Total: 6)  

     

    Photo of Author
    Scott Trowbridg…
    Newbie
    Newbie
    Posts: 11
    Any updates on this issue?

    Tyler Davis - Jul 22, 2020 4:15 pm (#4 Total: 6)  

    Alt-N Technical Support  

    Photo of Author
    Tyler Davis
    Frequent
    Frequent
    Posts: 259

    MDaemon
    RelayFax
    SecurityGateway
    Outlook Connector
    SecurityPlus
    ProtectionPlus
    WebAdmin
    Based on your screenshot, MDaemon does not look at subsequent lines of text to complete the regex match.

    --
    Tyler Davis
    MDaemon Technologies
    https://www.mdaemon.com

    ---------------------------------------------------------------------
    These forums are provided by MDaemon Technologies for user-to-user
    support and discussion. MDaemon staff members may participate in the
    forums periodically but please recognize that this is not the official
    method of receiving technical support. To receive personal technical
    support please use the form here:
    https://www.altn.com/Support/RequestSupport/
    ---------------------------------------------------------------------

    SCOTT TROWBRIDGE - Jul 30, 2020 9:33 am (#5 Total: 6)  

     

    Photo of Author
    SCOTT TROWBRIDG…
    Newbie
    Newbie
    Posts: 1
    Tyler, if we know there are issues with content filtering not work as shown using this example (https://regex101.com/r/5COGWm/)

    Global pattern flags (NOT WORKING)

    s modifier: single line. Dot matches newline characters
    m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)
    g modifier: global. All matches (don't return after first match)

    Is there a temporary workaround?

    Will this be addressed?

    Tyler Davis - Aug 6, 2020 3:58 pm (#6 Total: 6)  

    Alt-N Technical Support  

    Photo of Author
    Tyler Davis
    Frequent
    Frequent
    Posts: 259

    MDaemon
    RelayFax
    SecurityGateway
    Outlook Connector
    SecurityPlus
    ProtectionPlus
    WebAdmin
    I will check with our team to verify if this was configured as intended or if there could be additional work done with the regular expressions. If so, I can create a task for our development team to review for a future version.

    --
    Tyler Davis
    MDaemon Technologies
    https://www.mdaemon.com

    ---------------------------------------------------------------------
    These forums are provided by MDaemon Technologies for user-to-user
    support and discussion. MDaemon staff members may participate in the
    forums periodically but please recognize that this is not the official
    method of receiving technical support. To receive personal technical
    support please use the form here:
    https://www.altn.com/Support/RequestSupport/
    ---------------------------------------------------------------------



      All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



     Content:

    Read New | Search

     Guest:

    Email to Admin



    You are visiting as a Guest user.