I am updating an application that is requiring me to write something that will match on the HTML element names in a JSP.
The goal is to exclude the dynamically generated elements in the result. The elements are built from a loop to present a list on the page. The logic is used to uniquely ID a selected element. The format of the elements are as follows:
elementName_i, where i can be 0-15.
Now, I can't leverage the REGEX API like I was hoping to where I could exclude those elements with a character sequence ending in "_i" where I could use the expression for 0-9. I am working with JDK 1.2.
Can someone recommend a solution that will get me started in the right direction?
I can write something that does String evaluations or something and muddle my way through it, but I would like to see if there is a more clean way to go about it.
If you can use an LGPL package, check out the GNU Regex Library. I haven't used it, but it's been around for ages, and it works with Java 1.1 and up. There's also an older Java 1.0 version still available.
Joined: May 16, 2004
Thank you for the insight, David. On a recommendation from a colleague, this is what was implemented. Please note, I am not totally happy with this resolution: