Instant MQ2DataVar conversion with Textpad
Posted: Fri Apr 30, 2004 9:01 am
Sick of searching through your code to replace all those @params with ${param} to convert to the new MQ2DataVars?
If you use TextPad (shareware available - http://www.textpad.com/) for editing your code -- and you should -- you can use the regular expression search and replace function to find every instance of all your @param variables and replace it with ${param}. All of them, no matter what the name. With one mouse click.
Of course, you still have to redo your /declare calls, and your arrays to make them compliant, but at least it saves all that manual labor of just adding } to the end of your variables.
Here's the code:
Use search and replace, and be sure to click on the checkbox for enabling regular expressions.
For the search string, use
And for the replace string, use
Voila. All the seagulls you ever wanted.
--Vexix
If you use TextPad (shareware available - http://www.textpad.com/) for editing your code -- and you should -- you can use the regular expression search and replace function to find every instance of all your @param variables and replace it with ${param}. All of them, no matter what the name. With one mouse click.
Of course, you still have to redo your /declare calls, and your arrays to make them compliant, but at least it saves all that manual labor of just adding } to the end of your variables.
Here's the code:
Use search and replace, and be sure to click on the checkbox for enabling regular expressions.
For the search string, use
Code: Select all
@\([^[:punct:] ]*\)Code: Select all
${\1}--Vexix