Good
Regex find (Ctrl+Shift+F with the Use Regular Expressions option checked) [^/<]/[^/>]
in your solution - basically a /
that:
- is not preceded by another
/
or a<
(i.e. closing XML comment tags like</para>
) - is not followed by another
/
or a>
(i.e. standalone XML comment tags like<see cref="Foo"/>
)
The only false positives I see with this approach in a quick check against a solution of ~80 projects are...
- Dates (e.g.
1/1/2014
) /
in comments (e.g.Note that an up/down change....
)
...but others could come up depending on your code base - for example:
- URLs (e.g.
http://stackoverflow.com/users/1810429/j0e3gan
) - XPaths (e.g.
/Customer/Address/City/text()
)
Better
If you consistently put spaces between the division operator and its operands, you could tighten the regex a bit to alleviate these false positives, changing it from...
[^/<]/[^/>]
...to...
[^/<] +/ +[^/>]
...where +
will match one or more spaces of course.