Support > Forums > OpenBots Studio > Regex Matches not appearing
Hi,
I am able to show all Regex Matches using "Show Message" command but i can't when i use "Send Keystrokes" to Notepad or Excel Workbook. This is the error i got - "Exception Message: Keyword "rg-matches" is not valid." Any idea why?
This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...
Hello,
Please install version 1.2.1 of Studio and use the package manager in studio to install the Regex Commands. Studio 1.2.0 is only compatible with 1.2.0 commands. A patch has been made in 1.2.1 to allow for some backwards version compatibility.
Hi, apparently the Regex command is gone in Studio v1.2. Is there anyway i can use Regex in the latest version?
Hi ff@openbots.ai, thank you so much for clear explanation. Yup it works perfectly now :-) Yes the "Debug" function is really useful, thanks for the tip again.
Hello RotfCoy,
Thank you for reaching out to us.
The "Get Regex Matches" command you're using produces a List of string matches as its output. The reason the "Show Message" command is able to display the value and the "Send Keystrokes" is not is because the "Show Message" Command converts the List into a string for debug purposes. To actually use the List items, you need the "Get List Item" command to retrieve the match at the index that it is located in, usually 0 if there's only one match. Alternatively, you can use the "Loop Collection" command to loop through the entire List and retrieve all of its matches.
I recommend using the "Debug" button in combination with breakpoints when testing a script. You'll be able to see how the command outputs are being stored at runtime.
I hope that helps!
You are not authorized to reply, please click here to login and add your reply to this topic.