Hallo,
ich habe eine lange Zeichenkette und möchte den Zahlenwert nach einem festen String ermitteln. Aber wie? Irgendwie stehe ich auf dem Schlauch.
Delemiter bei grep (-d) und awk (-F) ist klar, aber ich möchte als "Delemiter" ja einen Textstring verwenden.
Mittels wget:
Code
eature=channels4&ved=CAQQmys" data-style-type="branded"><span class="yt-uix-button-content"><span class="subscribe-label" aria-label="Abonnieren">Abonnieren</span><span class="subscribed-label" aria-label="Abmelden">Abonniert</span><span class="unsubscribe-label" aria-label="Abmelden">Abmelden</span> </span></button><button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon yt-uix-subscription-preferences-button" type="button" onclick=";return false;" aria-live="polite" aria-busy="false" aria-role="button" aria-label="Abo-Einstellungen" data-channel-external-id="UCDjcRPtmNzBJTmoVY6OmYaA"><span class="yt-uix-button-icon-wrapper"><span class="yt-uix-button-icon yt-uix-button-icon-subscription-preferences yt-sprite"></span></span></button><span class="yt-subscription-button-subscriber-count-branded-horizontal yt-uix-tooltip" title="676" tabindex="0" aria-label="676 Abonnenten">676</span> <span class="yt-subscription-button-disabled-mask" title=""></span>
<div class="yt-uix-overlay " data-overlay-style="primary" data-overlay-shape="tiny">
<div class="yt-dialog hid " role="dialog">
<div class="yt-dialog-base">
<span class="yt-dialog-align"></span>
Delemiter wäre "yt-subscription-button-subscriber-count-branded-horizontal yt-uix-tooltip" tite" (um z.B. die Abonentenzahl zu ermitteln)
Aber mich würde auch prinzipiel die Lösung für eine solche Aufgabenstellung interessieren, danke![/code]