Jim Beard wrote:
I know this isn't exactly the list for it, but I've been reading
online for a while now and can't make heads or tails of my problem. I
want to match convert '<' sequences to '<' using a replace method
that matches on a regex pattern. I'm using Java and am having 0
luck. No sites online seem to mention & or ; other then in passing as
a punctuation character...
Shouldn't this be easy?
Yes, and I found a perl example with the search here:
http://www.google.com/search?q=perl+replace+%22%26lt%3B%22+%3C&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
That reveals a bunch of pages. Among them,
(http://www.codepedia.com/1/PerlPMTutorial).
Down the page is this:
$input =~ s/>/>/g;
Which tells perl to take the value of $input, find occurrences of ">"
and replace that with ">", globally. Then stick the results back into
$input.
If you replace the > and > with your values, it should be pretty
simple to get the rest of it as well.
--
Russ Johnson
Dimension 7/Stargate Online
http://www.dimstar.net
Top post? http://www.caliburn.nl/topposting.html
Random thought #14 (Collect all 25)
"There is a point beyond which even justice becomes unjust." - Sophocles
_______________________________________________
EUGLUG mailing list
euglug@euglug.org
http://www.euglug.org/mailman/listinfo/euglug