All pastes #2053464 Raw Edit

Miscellany

public java v1 · immutable
#2053464 ·published 2011-05-03 13:50 UTC
rendered paste body
import java.util.regex.Matcher;import java.util.regex.Pattern;public class test {	/**	 * @param args	 */	public static void main(String[] args) {		String text = "<td class=\"tableb\" width=\"25%\"><input class=\"input\" type=\"text\" name=\"subtitle\" value=\"The Social Network\" /></td>";		Pattern subtitlePattern = Pattern.compile("name=\"subtitle\" value=\"([^\"]*)");				Matcher match = subtitlePattern.matcher(text);		if (match.find() == true)			System.out.println(text.substring(match.start(1), match.end(1)));	}}