Reputation: 1991
I am trying to make a regex that will find all the commented code in Xcode project. Note that result of Regex must only contain commented code and must not contain the comments that we add to make the project more understandable.
Result of regex searching not contain the line like below
// this comment is added to make the function understandable
But contain the lines like
// [super viewWillDisappear:animated];
Upvotes: 0
Views: 1169
Reputation: 368
To anyone wondering how to use regular expression search "^./[/,*].;.*$" after selecting regular expression option from find menu after doing global search(command + shift + F)
Upvotes: 1
Reputation: 1991
I successfully make my required expression and it is
^.*/[/,\*].*;.*$
This will only find your single line or multiline commented code.
Upvotes: 7