6 Replies Latest reply on Jan 24, 2018 4:33 AM by srikanth akula

    Need help on Regular expression

    srikanth akula

      Hi,

       

      Could someone help on extracting a string

      for this string {"info":{"fileName":"WellsFargo_AUGUST_2016.pdf","fileClient":"900FMS, LLC","fileId":"16E13DF7-7E9A-4738-A878-7928A8283CEA"}} I just want to extract  WellsFargo_AUGUST_2016.pdf

       

      and for {"info":{"fileName":"123.pdf","fileClient":"Test37 Comp^*","fileId":"37154E42-AAC8-43C0-B663-3E5BDC996EAB"}} I want to extract 123.pdf

       

      Basically, want to extract .pdf string.

       

       

      Attached the workbook

       

      Thanks in advance!

       

      Best,

      Srikanth

        • 1. Re: Need help on Regular expression
          Norbert Maijoor

          Hi Srkanth,

           

          Find my approach as reference below and stored in attached workbook version 10.3 located in the original thread.

           

           

          1. D1. Find "fileName": find([Event Data],"fileName")

           

          2. D2. Find ".pdf": find([Event Data],".pdf")

           

          3. D3. Display: mid([Event Data],([D1. Find "fileName"]+11),(([D2. Find ".pdf"]-[D1. Find "fileName"])-7))

           

          4. Drag required objects to the indicated locations and "un-check" Show header of D3. Display

           


          Regards,Norbert

          1 of 1 people found this helpful
          • 2. Re: Need help on Regular expression
            Ruchika R

            Hi Srikanth,

             

            Check if this helps -

             

            Expected Result

             

            To achieve this, create an object with this definition (assuming 'filename and fileclient' will always be the text around the actual name)-

             

            Formula = Left(Mid(Mid([String],Find([String],'fileName'),Find([String],'fileClient')),12),Find(Mid(Mid([String],Find([String],'fileName'),Find([String],'fileClient')),12),'","fileClient')-1)

             

            Hope this helps

             

            Regards,

            Ruchika

            1 of 1 people found this helpful
            • 3. Re: Need help on Regular expression
              srikanth akula

              Hi Norbert Maijoor,

               

              Can we also extract browser from this string likr 'Chrome,Firefox'

              {"info":{"browser":"chrome; 61.0.3163.100","os":"windows; windows-7","device":"unknown","window":"1366x728"}}

              {"info":{"browser":"firefox; 56.0","os":"windows; windows-7","device":"unknown","window":"1366x768"}}

               

              if you select "login"  under eventype filter you would see the above strings.

               

              Thanks,

              Srikanth

              • 4. Re: Need help on Regular expression
                srikanth akula

                Hi Ruchika,

                 

                Can we also extract browser from this string likr 'Chrome,Firefox'

                {"info":{"browser":"chrome; 61.0.3163.100","os":"windows; windows-7","device":"unknown","window":"1366x728"}}

                {"info":{"browser":"firefox; 56.0","os":"windows; windows-7","device":"unknown","window":"1366x768"}}

                 

                if you select "login"  under eventype filter you would see the above strings.

                 

                Thanks,

                Srikanth

                • 5. Re: Need help on Regular expression
                  Ruchika R

                  Hi Srikanth,

                   

                  I believe this formula should help.

                  String =  {"info":{"browser":"chrome; 61.0.3163.100","os":"windows; windows-7","device":"unknown","window":"1366x728"}}

                   

                  Formula = Mid([String],Find([String],'browser')+10,Find([String],';')-(Find([String],'browser')+10))

                   

                  Regards,

                  Ruchika

                  1 of 1 people found this helpful
                  • 6. Re: Need help on Regular expression
                    srikanth akula

                    Thanks, Ruchika!