New topics: Your Pet, IOU, Baby IQ, The Poisons, Birther II, Games, Future Power

Welcome to the Tech Space!

Microsoft Related

Skip to end of metadata
Go to start of metadata

Wikipedia pages have the main content of the page wrapped by an HTML comment like this:

<!-- bodytext -->

<!-- /bodytext -->

Here is the java code to get the contents of that area:

		// Get the body
		Pattern rxBodyText = Pattern.compile("<!-- bodytext -->(.+)<!-- /bodytext -->", Pattern.DOTALL);
		Matcher m = rxBodyText.matcher(sResult);
		if (m.find())
		{
			sResult = m.group(1);			
		}
Labels:
java java Delete
regular regular Delete
expressions expressions Delete
regex regex Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.