Converting Output Using RegEx
The SaveToDB add-in and DBEdit allow processing handler output using regular expressions.
Use the RegEx event name and a set of regular expression lines in the HANDLER_CODE field of the xls.handlers table.
Here is a sample that processes the generated documentation before showing 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 is 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 contains a value to search and a value to replace, separated by the comma.