私は webharvest を初めて使用し、次のステートメントを使用して、Web サイトから記事データを取得するために使用しています。
let $text := data($doc//div[@id="articleBody"])
これは、上記のステートメントから取得したデータです。
The Refine Spa (Furman's Mill) was built as a stone grist mill along the on a tributary of Capoolong Creek by Moore Furman, quartermaster general of George Washington's army
Notable people
Notable current and former residents of Pittstown include:
私の質問は、上記の例の文字列を別の文字列から差し引くことは可能ですか?コンテンツから「著名人」です。
このようにすることは可能ですか?可能であれば方法を教えてください。ありがとう。私がこのようにできることはありますか:
if (*contains*($text, 'Notable people')) then $text := *minus*($text, 'Notable people')
containsは、文字列が別の文字列の部分文字列であるかどうかを判断するための関数名の例です。minusは、別の文字列から部分文字列を削除するための関数名の例です
望ましい出力:
The Refine Spa (Furman's Mill) was built as a stone grist mill along the on a tributary of Capoolong Creek by Moore Furman, quartermaster general of George Washington's army
Notable current and former residents of Pittstown include: