I would like to remove SQL Block Comments. Currently I'm using File Contents Iterator.
Is there a way to bypass the tag starting with /* and ending with */?
Thanks
I would like to remove SQL Block Comments. Currently I'm using File Contents Iterator.
Is there a way to bypass the tag starting with /* and ending with */?
Thanks
Hi Noah,
Thanks for posting. The solution for this problem is a little trickier than I originally thought, because SQL block comments are multiline, but I have a solution for you.
You can do this using the Text Find / Replace action. This action can use a regular expression to remove the commented sections, and then save the results to a second text file. You can use this text file with the File Contents Iterator. I've attached a sample project which demonstrates this, you'll just need to copy and paste the Text Find / Replace action into your project and change the path on the Find and Replace tabs.
Note that the regular expression in the action is pretty naive - for instance it can't handle something like /* as part of a SQL string literal, because it'll think it's a comment. It's probably possible to expand the regex to deal with some of these cases, but hopefully it's not necessary.
Regards,
Angus
SQL Block Comments.fbp6 (11.285 KB)