wilson1000
asked on
Remove PHP comments using Dreamweaver Regexes
Hello,
I need to remove all of the comments in a php file that is over 4000 lines long.
The comments consist of both types /**/ and //
I have a regular expression for the /**/ part :- [code sec below]
How can i remove the // comments from the document using Dreamweavers (unix like) regexes?
I need to remove all of the comments in a php file that is over 4000 lines long.
The comments consist of both types /**/ and //
I have a regular expression for the /**/ part :- [code sec below]
How can i remove the // comments from the document using Dreamweavers (unix like) regexes?
/\*[\S\s]+?(?=\*/)\*/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not sure, if you can attach a .txt file example of what crashes CS3 I can try it with CS4.
ASKER
ASKER
Sorry, this isn't enough code please bear with me a second...
ASKER
267 replacements made in CS4.
php-comments.txt
php-comments.txt
ASKER
Cool, so it works in CS4.
How do you find CS4 in comparison to CS3?
How do you find CS4 in comparison to CS3?
I moved from MX2004 to CS4 so I don't have experience with CS3. I haven't found anything with CS4 that I dislike but I code more than I design.
Thanks for the question and the points.
Thanks for the question and the points.
ASKER
No trouble, same here from the coding angle - much cleaner & quicker.
Take care
Take care
ASKER
When the regexe runs it clears only some of the comments but looks as though it gets stuck.
What would cause this?