stripping beginning of the line in the function list

stripping beginning of the line in the function list

4
NewbieNewbie
4

    Sep 16, 2006#1

    Hello
    I'm customizing UE to do some highlighting for SIP messages and I cannot create the proper Function.

    I want to search for all the strings starting with 'SIP/2.0'
    and display in the functions list only the rest of the line.

    The typical line could be:
    SIP/2.0 401 Authentication required
    SIP/2.0 100 Trying

    and I want to see:
    401 Authentication required
    100 Trying

    thanks!

    6,675585
    Grand MasterGrand Master
    6,675585

      Sep 16, 2006#2

      /Function String = "%SIP/2.0[ ^t]+^(*^)$"

      ^( ^) selects the text which should be displayed in the function list, at this regular expression everything after "SIP/2.0" and the following space(s)/tab(s) till end of the line.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Sep 16, 2006#3

        thank you, it works!

        And 2 more questions - is it possible to automatically highlight the following:
        - all the 3-digit numbers after 'SIP/2.0 '
        - all the digits in the string like 'm=audio 52304 RTP/AVP'

        What will be the proper syntax to combine the 2 following lines into one with 'OR':
        /Function String 2 = "%REGISTER *"
        /Function String 3 = "%INVITE *"

        Something like
        /Function String 2 = "%^{REGISTER^}^{INVITE^} *"
        but this doesn't work for me.

        thank you!

        6,675585
        Grand MasterGrand Master
        6,675585

          Sep 17, 2006#4

          ALL Numbers are automatically highlighted with the color setting Numbers. It's not possible to highlight just a special number. If the numbers are not highlighted in your file check the color setting for the color group Numbers for your language in the configuration dialog and also the delimiter characters at the line starting with /Delimiters = for your language in the wordfile. Maybe the space and/or the horizontal tab is missing in the list of delimiter characters which should be added to this line between other delimiters.

          /Function String 2 = "%^{REGISTER^}^{INVITE^} *$"

          should be better. * without a following specification always means 0 characters.
          Best regards from an UC/UE/UES for Windows user from Austria

          4
          NewbieNewbie
          4

            Sep 17, 2006#5

            Mofi wrote:
            /Function String 2 = "%^{REGISTER^}^{INVITE^} *$"

            should be better. * without a following specification always means 0 characters.
            does not work :(

            Sample text:
            REGISTER sip:domain.net:5060 SIP/2.0
            INVITE sip:[email protected]:5060 SIP/2.0

            6,675585
            Grand MasterGrand Master
            6,675585

              Sep 17, 2006#6

              I have tried the following 2 regular expressions in the wordfile with UltraEdit and it works fine for the 4 example lines you have posted.

              /L20"SIP" Nocase Noquote File Extensions = SIP
              /Delimiters = # $tab()*+,./:;<=>\
              /Function String = "%SIP/2.0[ ^t]+^(*^)$"
              /Function String 1 = "%^{REGISTER^}^{INVITE^} *$"


              Have the lines in your wordfile really no preceding white-space characters?

              For example this will not work

              Code: Select all

               SIP/2.0 401 Authentication required
              	SIP/2.0 100 Trying
                REGISTER sip:domain.net:5060 SIP/2.0
               	INVITE sip:[email protected]:5060 SIP/2.0
              except you insert [ ^t]++ in both regular expression after the % character like shown below (with additional ^(^) in the 2nd regex to trim the preceding white spaces in the function list):

              /Function String = "%[ ^t]++SIP/2.0[ ^t]+^(*^)$"
              /Function String 1 = "%[ ^t]++^(^{REGISTER^}^{INVITE^} *^)$"


              What is your second regular expression function string?

              /Function String 2 = is for the 3rd regular expression as you can see for example at /L1"C/C++" in the standard wordfile.txt.
              Best regards from an UC/UE/UES for Windows user from Austria

              4
              NewbieNewbie
              4

                Sep 17, 2006#7

                thank you for the answer!
                Actually it was my fault - I've made incorrect description. In fact I'm trying to put more then 2 words on the same string (2 words are OK), and this does not work:

                /Function String = "%^{REGISTER^}^{INVITE^}^{ACK^} *$"

                should I create a separate function string for each pair of the words?

                6,675585
                Grand MasterGrand Master
                6,675585

                  Sep 18, 2006#8

                  Yes! The UltraEdit style OR expression allows only 2 arguments: A OR B. More is not possible.
                  Best regards from an UC/UE/UES for Windows user from Austria