This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

regex to filter the pipe | sign

Hello,
I would like to filter the | sign via a regex. 
Due to the friendly entry in X-MIMETrack line of mails from Lotus Notes clients which actually contains sth. like Release XX | bla blubb it isn`t possible to match with \| because every Mail sent with a notes client will then be placed into quarantiine.
So I spoke the magic regex spell (?
Seems that the Astaro has a syntax check loving HTML comments [;)]

I know my regex is not an "every day regex" but it should be quite perl compatible. The astaro also has not told any "this is not a regex" errors.

Is there anyone who has a explanation or solution or workaround  for this phenomena?

greetings

theoctagon 
(running ASL Release 5.200)


This thread was automatically locked due to age.
  • Although it is not shown correctly in WebAdmin, it works fine on my test machine:

     Code:
     
    data
    354 Enter message, ending with "." on a line by itself
    Subject: Test message

    This is a test message containign a regular p|pe.
    It should be blocked.

    .
    550 Matched regular expression: (?

     

    If I take a look at the source code of the webadmin page it looks like this:

    Code:
     
    (?
      

     

    So the WebAdmin saves and loads the regular expression correctly, the SNMP server can use it - the only thing not working is some kind of escaping for the HTML special chars which might occur in the regular expression.

    Your problem is probably a browser issue, I used firefox to enter the regular expression. Which browser did you use?

    Cheers,
    andreas
  • I used firefox (Linux Version), too.
    that`s what I see in the regex table of smtp proxy:
    11  (?

    but as you intended the regex seems to work

    In the source code of the frame I can see the following which also seems to be correct:
    id="regexps_content"
    ...
    value="(?
  • Hello again [;)]

    Another issue:

    Thanks to Lotus Notes the number of characters between Release and the | sign differ in the different notes versions.

    Why isn`t this regex possible? 

    Code:
     (?


    Isn`t it implemented in perl regex?
    This statement works well in the fancy tool regex buddy.

    The following is said by Astaro if I try to add the expression

    Code:

    (?




    Sorry, this does not look like a valid expression
    Variable length lookbehind not implemented in regex; marked by  line 199.
    I also tried: Code:
    (?

    same error as above. Any possible solution to "wildcard" the number of characters? Or do I have to make an own entry for every Lotus Notes Release?
  • I submitted the display problem as a bug entry, but it is rather cosmetic and has therefore a low priority. Anyway, thanks for reporting!

    Cheers,
    andreas