Skip to main content
edited body
Source Link
user13742
user13742

You can try a naive approach to match non-comments like this:

 $ egrep -v "^(//|/\*| \*)" sourcecode

This will only reverseinverse match against prefixed comments - that is lines starting with either //, /*, * or */ - and hence it'll not leave out blocks that are commented out with the /* and */ pair.

You can try a naive approach to match non-comments like this:

 $ egrep -v "^(//|/\*| \*)" sourcecode

This will only reverse match against prefixed comments - that is lines starting with either //, /*, * or */ - and hence it'll not leave out blocks that are commented out with the /* and */ pair.

You can try a naive approach to match non-comments like this:

 $ egrep -v "^(//|/\*| \*)" sourcecode

This will only inverse match against prefixed comments - that is lines starting with either //, /*, * or */ - and hence it'll not leave out blocks that are commented out with the /* and */ pair.

added 231 characters in body
Source Link
user13742
user13742

You can try a naive approach to match non-comments like this:

 $ egrep -v "^(//|/\*| \*)" sourcecode

This will only reverse match against prefixed comments - that is lines starting with either //, /*, * or */ - and hence it'll not leave out blocks that are commented out with the /* and */ pair.

You can try a naive approach like this:

 $ egrep -v "^(//|/\*| \*)" sourcecode

You can try a naive approach to match non-comments like this:

 $ egrep -v "^(//|/\*| \*)" sourcecode

This will only reverse match against prefixed comments - that is lines starting with either //, /*, * or */ - and hence it'll not leave out blocks that are commented out with the /* and */ pair.

Source Link
user13742
user13742

You can try a naive approach like this:

 $ egrep -v "^(//|/\*| \*)" sourcecode