(explanation of blog post title: where xx is any number of letters)
i want to find/search for all instances of "change" in a file in eclipse, but NOT match instances of "onchange":
\bchange
will match strings like:
change in:
<h:outputText value="Please change your password" />
changePwdPanel in:
oncomplete="#{rich:component('changePwdPanel')}.show()" />
BUT NOT
onchange in:
<a4j:support event="onchange" reRender="additionalConfigReqion">
\b is a word boundary
thanks to Jan Goyvaerts's post How to match whole words with a regular expression for pointing me in the right direction :)
---
search strings i googled to find the answer i was looking for:
regex match whole word
regex match string dont match certain part of the string
No comments:
Post a Comment