Regex Tutorial on Guidesigner

169 views
Skip to first unread message

Alexander S Argollo

unread,
Jul 3, 2013, 10:52:09 PM7/3/13
to comman...@googlegroups.com
Hi Guys, anybody have a tutorial that have information how to use Regex tester on guiDesigner?
I am using a each one on web but dind't working very well.

BR
Alex

Jarrod Bell

unread,
Jul 3, 2013, 11:12:20 PM7/3/13
to comman...@googlegroups.com
Enter your regex, then enter some test data.
If your regex matches, the captured data will show in the list below. If not, check the status bar of the regex tester for a message.

Note that if you are using hex byte data in your regex (eg. \x00-\xFF) then you cannot easily test this because you cannot type hex bytes out of the printable range into the test data field.
Instead you can test by escaping the \x00 with an extra backslash \\x00, then enter the hex data as a string like \x00 in the test data field.

Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Terence

unread,
Jul 3, 2013, 11:17:17 PM7/3/13
to comman...@googlegroups.com, jar...@commandfusion.com
From the CF Wiki : http://www.commandfusion.com/wiki2/software/gui-designer/regex-tester

Perhaps you can post the data that you want to parse and what's your expected output and we can help out from there.

Alexander S Argollo

unread,
Jul 4, 2013, 10:09:56 PM7/4/13
to comman...@googlegroups.com
Hi Guys, i found a good software (freeware) on web: RegExr to write and test Regex Expressions.

Terence i wrote the bigger Regex Pattern as you can see below, if you have any sugestions to improve it, plese, let me know:

NodeElemRegex: /methodName.(\w*).+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*)\<\/Argument.+?Argument type.\"\w*.\>(\w*).+\<\/Argument/i,


I using the Regex Pattern above to read the folow strings below:

a) 
Msg=<zbpPacketResponse><Object>ZBP_Node</Object><methodName>Node_GetNode</methodName><Arguments><Argument type="uchar">0</Argument><Argument type="ushort">409f</Argument><Argument type="qulonglong">137a00000017bc</Argument><Argument type="uint">4001</Argument><Argument type="QString"></Argument><Argument type="QVector&lt;ushort&gt;" length="0">[]</Argument><Argument type="QByteArray" length="1">[00]</Argument><Argument type="QString">ZBLC15</Argument><Argument type="QString">S3</Argument><Argument type="QString">ZBLC15.png</Argument><Argument type="QString"></Argument><Argument type="QString">BasicEP,1</Argument></Arguments><id>16650</id><session>67108cbc-0621-4bfd-a57e-bbe44895056a</session></zbpPacketResponse>


Thanks a lot!
BR
Alex
b) 
Msg=<zbpPacketResponse><Object>ZBP_Node</Object><methodName>Node_GetNode</methodName><Arguments><Argument type="uchar">0</Argument><Argument type="ushort">8c9b</Argument><Argument type="qulonglong">2079614dffffffff</Argument><Argument type="uint">3432</Argument><Argument type="QString"></Argument><Argument type="QVector&lt;ushort&gt;" length="0">[]</Argument><Argument type="QByteArray" length="1">[00]</Argument><Argument type="QString">Messenger</Argument><Argument type="QString">Messenger</Argument><Argument type="QString">default.png</Argument><Argument type="QString"></Argument><Argument type="QString"></Argument></Arguments><id>16650</id><session>67108cbc-0621-4bfd-a57e-bbe44895056a</session></zbpPacketResponse>


2013/7/4 Terence <terry...@gmail.com>
From the CF Wiki : http://www.commandfusion.com/wiki2/software/gui-designer/regex-tester

Perhaps you can post the data that you want to parse and what's your expected output and we can help out from there.

--
You received this message because you are subscribed to a topic in the Google Groups "CommandFusion Software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commandfusion/8K0BJeMqwjo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commandfusio...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
atenciosamente,
Alexander S Argollo
11-99468494
mailto: alexande...@gmail.com

Clayton Vicente

unread,
Jul 4, 2013, 10:19:50 PM7/4/13
to comman...@googlegroups.com

This is the best tutorial about Regex that i read
Clayton

Date: Thu, 4 Jul 2013 23:09:56 -0300
Subject: Re: Regex Tutorial on Guidesigner
From: alexande...@gmail.com
To: comman...@googlegroups.com
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.

Mathias

unread,
Feb 5, 2016, 2:25:03 PM2/5/16
to CommandFusion Software
Hi Jarrod,
I have some trouble with the Regex Tester:
I'd like to test on a hex byte and tried the following:
Value=(.) as Regex and as a test
Value=\x4D
but the Tester caputeres the blackslash.

any hint on that?

Mathias


Jarrod Bell

unread,
Feb 5, 2016, 4:29:37 PM2/5/16
to comman...@googlegroups.com
You can't type hex data in the test area. What you typed is not a hex byte, it's four characters.

--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages