Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
how to extract tag from java by expression.
John McDonald
Ranch Hand
Posts: 112
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
I would like to use token to extract <B>bold</B> to three simple tokens. Any idea how to define this expression in StringTokenizer, please? Thanks and much appreciate.
John
Barry Higgins
Ranch Hand
Posts: 89
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<B> bold </B>
(<*>
(*)(</*>
You can then reference each token using the group function in Matcher.
eg.
Mathcher m=Pattern.compile("(<*>
(*)(</*>
").matcher(stringForParsing);
for (int i=0; i<=m.groupCount(); i++)
System.out.println(m.group(i));
Hope that helps,
Barry
Barry Higgins
Ranch Hand
Posts: 89
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The smiley faces went in there automatically that expression should look like
"(<*>)(*)(</*>)"
I hope it came out OK this time
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Confused with Xpath expression! Need Help.
Two questions on " JSP SYNTAX 1.2 " issued by SUN
XPath
Need Help - XML Parsing - JDOM
XSLT string processing
More...