This shows you the differences between two versions of the page.
software:gui-designer:regex-tester [2013/07/04 09:36] terrylau [Regex Tester] Add info and screen capture for hex testing |
software:gui-designer:regex-tester [2020/06/24 00:55] (current) jarrod |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Regex Tester ===== | ===== Regex Tester ===== | ||
+ | |||
+ | guiDesigner features a built in regular expression tester, but there are also great online resources for testing regular expressions such as: | ||
+ | * http://regex101.com - Great tool for testing against text data and showing highly detailed capture information. | ||
+ | * http://www.regexper.com - This site shows a handy explanation for any regex entered. | ||
The Regex Tester in guiDesigner can be used to test the regex pattern and ensure the correct data is captured when feedback strings come through the feedback system. | The Regex Tester in guiDesigner can be used to test the regex pattern and ensure the correct data is captured when feedback strings come through the feedback system. | ||
Line 11: | Line 15: | ||
{{:software:gui-designer:regx_hex.png?nolink&400|}} | {{:software:gui-designer:regx_hex.png?nolink&400|}} | ||
- | To test hex data, escape the test data with an additional backslash i.e. \\x00. Then when applying the final regex, remember to remove the extra backslash. | + | To test hex data, escape the regex with an additional backslash i.e. \\x00. Then when applying the final regex, remember to remove the extra backslash.\\ |
+ | Also, note that hex bytes are treated as a **single byte** in your final regex, whilst it would be treated as **4 bytes** in the tester once adding the extra backslash. So make sure to adjust your final regex to account for the size differences. |