(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
IT, computer and programming tutorials and tips that i couldnt find anywhere else using google, from my daily work as a Senior Developer of solutions using Java and Linux.

The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

20130107
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment