はじめまして。
チュートリアルを本日より始めました
”基本のプロセスを作成する”よりスタートいたしました
テキストを取得に関して質問があり投稿させていただいた次第です
テキストを取得アクティビティでは長文中の単語を選択することはできないのでしょうか
文章全体もしくはピリオドまでもしくはその行の選択となってしまいます
単語のみを選択する方法があればご教授頂きたく存じます。
以上、宜しくお願い申し上げます
Get text activity is basically getting the text from an element
In most of the cases - the full text will be part of a text box or label element and hence the output of get text will be full text from that element
Usually we do string operations or regex match to get the required text only
While you capture the element - if you could capture only the required text element - it is possible. Else you better capture the full text and do string operations to get the required value
Hope it helps
Happy Automation
Welcome to UiPath !
Assign activity:
yourText = "The quick brown fox jumps over the lazy dog."
Assign activity:
wordsArray = yourText.Split(" "c)
- Access individual words by index:
wordsArray(0)
→ “The”wordsArray(1)
→ “quick”wordsArray(2)
→ “brown”
So on…
「役立った場合は、解決策としてマークしてください。」
Indeed, the “Get Text” function in UiPath pulls structured text from a document (ex: sentences or paragraphs), but is not concerned with extracting individual words. If you want to select a specific word, you can use String Manipulation, Regex (Matches Activity) to takes out a predefined word within a body of text, or you can use Anchor Base with Get Text by
using “Find Element” or “Find OCR Text Position” as the anchor element. After that, use “Get Text” to gather the word adjacent to the anchor.
Hey @hiroyuki.miyauchi Welcome to the community
get text extracted all the element value you are selecting and if you want some specific value from the text you can use the Regex Method or you can do with the help of string manipulation method.
cheers
I can never thank you enough for your reply.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.