VoxCommando
Help and Support (Using VoxCommando) => RegEx (Regular Expressions) => Topic started by: Haddood on October 26, 2014, 09:36:50 AM
-
ok this is driving me :bonk :bonk
I am working on improved "what can I say" command, which scrape the info from voicecommand.xml directly instead of relying on the help html.
after isolating the group code ... I am applying regex to isolate the commands within the group (after this I am supposed to extract the phrases)
I am applying regex.single using
<command\sid=.*?>(.*?)</command>
on the attached xml ... I get back 18 matches instead of 5
what is the missing part ????
-
Based on just the info you've provided, I think the problem is happening before this step, when you're trying to isolate the group-level xml.
If you look at the group.xml file that you've posted, there are repeated commands there.
-
Based on just the info you've provided, I think the problem is happening before this step, when you're trying to isolate the group-level xml.
If you look at the group.xml file that you've posted, there are repeated commands there.
I will verify that again....
However before I posted I checked many times, I opened the attached xml in notpad++ and the commands nodes collapse to 5 commands only ...
-
Don't collapse the nodes. The group.xml you posted is not valid xml.
There are 4 copies of each command but they are not nested correctly. A new command tag appears in the middle of a param element.
In order to help we would need to see a copy of the actions you are using to isolate the group xml and also the original xml that you are working with.
-
This is the regex.single I am using to isolate groups
<commandGroup.*?name="{Var.CommandGroup}".*?>(.*?)</commandGroup>