Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Einsteigerfragen
    4. Parser Regex mit Tab und NewLine

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Parser Regex mit Tab und NewLine

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

      Hallo,
      ich möchte die Statusseite meine Wechselrichters mit dem Parser-Adapter auslesen. Ich habe mich auch in das Thema RegEx "reingequält" und konnte zumindest in regex101 seinen passenden Ausdruck erstellen. Leider kommt der Parser Adapter damit nicht zurecht. Zumindest gibt er im Protokol immer einen "Cannot find number in answer for parser.0.Meteocontrol" zurück. Jetzt stellt sich mir die Frage: Liegt es an meinem RegEx oder ist es eine Limitation des Adapters?

      Hier ein Auszug aus dem Quelltext der Seite:

      <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
      
      				<!-- heading -->
      				<tr><td align="center">
      					<table class="tablebody" border="0" width="100%">
      						<tr><td class="cNavInfo">Online-Werte &raquo; Wechselrichter- bersicht</td></tr>
      					</table>
      				</td></tr>
      				<tr><td>&nbsp;</td></tr>
      
      				<!-- all inv summary -->
      				<tr>
      					<td class="tablebody">
      						<table width="100%"	border="0">
      							<tr class="tablehead">
      								<td colspan="7"><strong>Summe aller Wechselrichter</strong></td>
      							</tr>
      							<tr>
      								<td class="tablehead">Bezeichnung</td>
      								<td class="tablehead">Wert</td>
      								<td class="tablehead">Einheit</td>
      								<td>&nbsp;</td>
      								<td class="tablehead">Bezeichnung</td>
      								<td class="tablehead">Wert</td>
      								<td class="tablehead">Einheit</td>
      							</tr>
      							<tr>
      								<td>Aktuelle Leistung</td>
      								<td>&nbsp;<b>2.123</b></td>
      								<td>kW</td>
      								<td>&nbsp;</td>
      								<td>Aktuelle Monatsenergie</td>
      								<td>&nbsp;192.923</td>
      								<td>kWh</td>
      							</tr>
      

      Und hier das RegEx, welches in RegEx101 das richtige Ergebnis ( 192.923) zurückliefert:

      Aktuelle Monatsenergie<\/td>\n\t\t\t\t\t\t\t\t<td>&nbsp;(\d+.\d+)
      
      

      Mir stellt sich die Frage: Hat der Parser ein Problem mit dem Zeilenumbruch bzw. den Tabs? Oder sitzt das Problem vor dem Rechner?

      Vielen Dank!!!

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

        @robitobi rgie[^\d]+([\d\.]+)

        @robitobi sagte in Parser Regex mit Tab und NewLine:

        ein Auszug aus dem Quelltext der Seite:

        nutzt nicht wirklich was!

        @robitobi sagte in Parser Regex mit Tab und NewLine:

        Hat der Parser ein Problem mit dem Zeilenumbruch

        ja

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

        Support us

        ioBroker
        Community Adapters
        Donate

        597
        Online

        31.9k
        Users

        80.2k
        Topics

        1.3m
        Posts

        2
        2
        133
        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