Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [GELÖST_Danke]Parser Regex Hilfe bitte

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [GELÖST_Danke]Parser Regex Hilfe bitte

    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      linux150 last edited by linux150

      Hallo!
      Dachte ich bekomme es hin da ich schon so einiges Parse aber hier komme ich nicht weiter.
      Vielleicht kann mir ja wer den richtigen Schubs geben....

      <einsatzsubtyp id="OELSPUR-TK">ÖLSPUR, ÖLAUSTRITT</einsatzsubtyp>
      <adresse>
      <default/>
      <earea/>
      <emun/>
      <efeanme/>
      <estnum/>
      <ecompl/>
      </adresse>
      <bezirk id="3">Gmunden</bezirk>
      

      Das ist der Quelltext und ich bräuchte vom <einsatzsubtyp> nur den zweiten Teil (Ölspur, Ölaustritt) weis aber nicht wie ich da rankomme da die ID ja variabel ist.
      Das selbe Thema habe ich beim Bezirk Gmunden, da ist die ID davor auch variabel.
      LG
      Martin

      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @linux150 last edited by Homoran

        @linux150 sagte in Parser Regex Hilfe bitte:

        Das ist der Quelltext

        der vollständige???
        wo kommt das her?
        ist das XML o.ä.?

        \>([\W,\S]+)\<\/ein

        L 1 Reply Last reply Reply Quote 1
        • L
          linux150 @Homoran last edited by linux150

          @homoran
          Danke,
          Kommt von https://cf-intranet.ooelfv.at/webext2/rss/webext2_laufend.xml

          Ergebnis sollten zwei Datenpunkte sein.
          Einmal "Einsatztyp" mit dem Inhalt (in diesem Fall) Ölspur, Ölaustritt
          und "Bezirk" mit dem Inhalt Gmunden

          Zum Zeigen das ich mich bemühe 🙂
          <einsatztyp id=""([^<]) bringt schon mal VU">VERKEHRSUNFALL jetzt noch ohne dem XX"> und gut is.
          <bezirk id=""([^<]) bringt 13">Vöcklabruck (da gehört das xx"> noch raus)

          LG

          Homoran 1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @linux150 last edited by Homoran

            @linux150 sagte in Parser Regex Hilfe bitte:

            Einmal "Einsatztyp" mit dem Inhalt (in diesem Fall) Ölspur, Ölaustritt

            klappt das nicht was ich geschrieben habe?
            dann nimm mal ([\w,\sÄÖÜ]+)\<\/ein
            und für Bezirk \>([\wäöüß]+)\<\/bez

            L Homoran 2 Replies Last reply Reply Quote 1
            • L
              linux150 @Homoran last edited by

              @homoran Danke
              Bezirk klappt schon mal, super!

              Einsatztyp bringt jetzt nur TEE ?!

              LG

              Homoran 1 Reply Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @linux150 last edited by

                @linux150 sagte in Parser Regex Hilfe bitte:

                Einsatztyp bringt jetzt nur TEE ?!

                u d was steht JETZT im xml?

                L 1 Reply Last reply Reply Quote 1
                • L
                  linux150 @Homoran last edited by

                  @homoran 2023-04-08 11_16_30-Window.png

                  Hab das Objekt der Begierde mal eingezeichnet
                  LG

                  Homoran 1 Reply Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @linux150 last edited by Homoran

                    @linux150 sagte in Parser Regex Hilfe bitte:

                    Hab das Objekt der Begierde mal eingezeichnet

                    nett!
                    aber das Foto kann ich nicht analysieren 😡

                    aber eben war es noch der subtyp!

                    L 1 Reply Last reply Reply Quote 1
                    • Homoran
                      Homoran Global Moderator Administrators @Homoran last edited by

                      @homoran sagte in Parser Regex Hilfe bitte:

                      dann nimm mal ([\w,\sÄÖÜ]+)</ein

                      da brauch ich nicht zu testen, da musst du einfach auf den gesamten Bezeichner erweitern

                      ([\w,\sÄÖÜ]+)\<\/einsatzsubtyp

                      L 1 Reply Last reply Reply Quote 1
                      • L
                        linux150 @Homoran last edited by

                        @homoran
                        Ja SORRY selber gerade bemerkt.

                        Des Rätsels Lösung ist >([^<]+)</einsatzsub
                        Danke für deine Hilfe !!!
                        LG
                        Martin

                        1 Reply Last reply Reply Quote 0
                        • L
                          linux150 @Homoran last edited by

                          @homoran said in Parser Regex Hilfe bitte:

                          ([\w,\sÄÖÜ]+)</einsatzsubtyp

                          Oder so, SUPER DANKE für deine Hilfe!

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          907
                          Online

                          31.7k
                          Users

                          79.8k
                          Topics

                          1.3m
                          Posts

                          2
                          11
                          339
                          Loading More Posts
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes
                          Reply
                          • Reply as topic
                          Log in to reply
                          Community
                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                          The ioBroker Community 2014-2023
                          logo