Skip to main content

a question about using regular expression

1 reply [Last post]
Joined: 2007-11-17

This is a part of HTML file.
SPAN A href=… how /A /SPAN
SPAN A href=… are/A /SPAN
SPAN A href=… you /A /SPAN

SPAN /SPAN A and /A are tags, i omit angel brackets intentionally

I want to use regular expression to extract content between two tags SPAN and /SPAN
What should the regular expressin and code be?

Message was edited by: jtqiu

Message was edited by: jtqiu

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-12-18

[url=]java.util.regex.Pattern[/url] will help you nicely here. Additionally, [url=]java.util.Scanner[/url] may alleviate I/O drudgery you encounter.