![]() |
AW: Wort aus String extrahieren
Ich habe kein Delphi XE, aber ungefähr so müsste es mit den XE-Regexen funktionieren (keyword1, keyword2... sind die Schlüsselwörter, auf die ein für dich interessantes Wort folgt) :
Code:
In Match.Groups{1] ist das gefundene Schlüsselwort, in Match.Groups[2] das Wort dahinter.
var
regexpr : TRegEx; match : TMatch; begin regexpr := TRegEx.Create('(Keyword1|Keyword2|Keyword3)\W+(\w+)',[roIgnoreCase]); match := regexpr.Match(Outbound); if match.Success then Outbound:=Match.Groups[2]; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:05 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz