#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^\s*@(?<param>\S+)(?<dtwhitespace>\s*)\/\*##DATATYPE\((?>lhapp_owner\.)?(?<datatype>[^)]+)[^ ,]+(?<outparam>\s*OUT)?(?<comma>,?)(?<paramwhitespace>\s*)?(?<paramdoc>--##PARAM @.*)$"
Local $sString = " @nInventoryPackID /*##DATATYPE(inventorypack.inventorypackid)<*/INT/*>##*/, --##PARAM @nInventoryPackID The ID of the inventory pack to be reclassifyed" & @CRLF & _
" @sInventoryPackNo /*##DATATYPE(inventorypack.inventorypackno)<*/NVARCHAR(254)/*>##*/, --##PARAM @sInventoryPackNo The inventory pack number to be reclassifyed (for logging)" & @CRLF & _
" @nQuantity /*##DATATYPE(inventorypack.quantity)<*/FLOAT/*>##*/, --##PARAM @nQuantity Quantity on the original pack" & @CRLF & _
" @nNewPartID /*##DATATYPE(inventorypack.partid)<*/INT/*>##*/, --##PARAM @nNewPartID ID of th epart associated with the new pack" & @CRLF & _
" @sNewInventoryPackNo /*##DATATYPE(inventorypack.inventorypackno)<*/NVARCHAR(254)/*>##*/, --##PARAM @sreclassifyInventoryPackNo The new reclassifyed inventory pack number " & @CRLF & _
" @nNewInventoryStateID /*##DATATYPE(invstate.invstateid)<*/SMALLINT/*>##*/, --##PARAM @nreclassifyInventoryStateID The state of the new pack " & @CRLF & _
" @nNewLocationID /*##DATATYPE(inventorypack.locationid)<*/INT/*>##*/, --##PARAM @nNewLocationID The location of the reclassified pack " & @CRLF & _
" @sFIFONumber /*##DATATYPE(inventorypack.fifonumber)<*/NVARCHAR(254)/*>##*/, --##PARAM @sFIFONumber the fifo number" & @CRLF & _
" @nLabelRequired /*##DATATYPE(settingsdatatype.datatypetinyint)<*/TINYINT/*>##*/, --##PARAM @nLabelRequired flag to indicate if a label is required to be printed" & @CRLF & _
" @nPrinterID /*##DATATYPE(lkmachinestageprinter.printerid)<*/TINYINT/*>##*/, --##PARAM @nPrinterID ID of the printer for a label" & @CRLF & _
" @nNewQuantity /*##DATATYPE(inventorypack.quantity)<*/FLOAT/*>##*/, --##PARAM @nNewQuantity Quantity on the new pack" & @CRLF & _
" @sComments /*##DATATYPE(comments.comments)<*/NVARCHAR(2000)/*>##*/, --##PARAM @sComments any comments for the new pack" & @CRLF & _
" @dOpenedDT /*##DATATYPE(inventorypack_.openeddt)<*/DATETIMEOFFSET/*>##*/, --##PARAM @dOpenedDT DATETIMEOFFSET the form was opened" & @CRLF & _
" @dModifiedDT /*##DATATYPE(settingsdatatype.datatypetimestamp)<*/DATETIMEOFFSET/*>##*/, --##PARAM @dModifiedDT The current plant date/time" & @CRLF & _
" @nLoginID /*##DATATYPE(lhapp_owner.auditlog.loginid)<*/SMALLINT/*>##*/, --##PARAM @nLoginID The loginID of the user logged on causing this call (1 if via Udi)" & @CRLF & _
" @nSessionID /*##DATATYPE(lhapp_owner.auditlog.lhsessionid)<*/INT/*>##*/, --##PARAM @nSessionID The IE session ID of the user's log on" & @CRLF & _
" @nPlantID /*##DATATYPE(lhapp_owner.auditlog.plantid)<*/SMALLINT/*>##*/, --##PARAM @nPlantID The plant ID (used for filtering the audit)" & @CRLF & _
" @nLangID /*##DATATYPE(lhapp_owner.login.rflanguageid)<*/SMALLINT/*>##*/, --##PARAM @nLangID The language ID to report any errors in" & @CRLF & _
" @nEntityTransactionLogID /*##DATATYPE(entitytransactionlog.entitytransactionlogid)<*/INT/*>##*/ OUT, --##PARAM @nEntityTransactionLogID The ID of the created entitytransactionlog entry" & @CRLF & _
" @nParentEntityTransactionLogID /*##DATATYPE(entitytransactionlog.entitytransactionlogid)<*/INT/*>##*/ --##PARAM @nParentEntityTransactionLogID The ID of the entitytransactionlogs parent "
Local $sSubst = "\t${param}${dtwhitespace}IN${outparam}\t\t${datatype}%TYPE${comma}${paramwhitespace}${paramdoc}"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm