Welcome Guest, Not a member yet? Register   Sign In
regex for mass removing my log_message(....) lines
#1

[eluser]dmyers[/eluser]
unfortunately, I am not a regex guru. Can somebody help me out and tell me the regex for removing all of my log_message(...) lines?

After I am done debugging stuff they tend to litter my code / classes and I would like to get rid of them with a quick find & replace in a text wrangler selected folder of files.

Thank's
#2

[eluser]TheFuzzy0ne[/eluser]
It can be done, but it could potentially become quite complex. Instead, I'd suggest that you grep for log_message() lines and comment them out manually. Are there really that many?
#3

[eluser]sophistry[/eluser]
off the top of my head...
pattern
Code:
'(^.*log_message.+$)'
replace
Code:
'\/\/\1'

only works if you have no return/linebreaks in your log_message lines.

still, fuzzy's suggestion is the best.




Theme © iAndrew 2016 - Forum software by © MyBB