Converting Output Using RegEx
The SaveToDB add-in and DBEdit enable you to process handler output with regular expressions.
To use this feature, specify the RegEx event name and provide a set of regular expression lines in the HANDLER_CODE field of the xls.handlers table.
Here's an example that processes generated documentation before displaying it in a window:
ID | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | EVENT_NAME | HANDLER_SCHEMA | HANDLER_NAME | HANDLER_TYPE | HANDLER_CODE | TARGET_WORKSHEET | MENU_ORDER | EDIT_PARAMETERS |
---|---|---|---|---|---|---|---|---|---|---|---|
doc | view_objects | Actions | doc | xl_actions_show_doc | PROCEDURE | 11 | |||||
doc | view_diagrams | Actions | doc | xl_actions_show_doc | PROCEDURE | 11 | |||||
doc | xl_actions_show_doc | RegEx | ATTRIBUTE | <RegEx> |
Here’s a partial sample of the RegEx content:
'( |td>|br>|<p>)(https?://[^ \r\n]*[A-Za-z_1-9\/])([ \r\n\.])' , '$1[$2]($2)$3' '( |td>|br>|<p>)((dbo[1-9]*|xls[1-9]*|doc|logs)\.[A-Za-z_1-9]+)' , '$1[$2](#$2)'
Each line consists of a search pattern and a replacement value, separated by a comma.