regex - Get specific Value as String c# -


simple:

i messagebody xitem.body:

"<html>\r\n<head>\r\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\r\n</head>\r\n<body>\r\ndies ist test nummer 3\r\n</body>\r\n</html>\r\n" 

and need save content between <body>\r\n \r\n</body> like:

m_description = xitem.body;

what's easiest! way ?

thanks feedback regarding external tool. use in future now, problem coded function:

    private string extractbetweenbodytags(string str1)     {          if ( ! string.isnullorempty(str1))         {             int p1 = str1.indexof("<body>\r\n");                 if (p1 >-1)                 {                     string str2 = str1.substring(p1 + "<body>\r\n".length);                     int p2= str2.indexof("\r\n</body>");                     if (p2 > -1)                     {                         str2 = str2.substring(0,p2-1 );                         return str2;                     }                 }         }         return "";     } 

and had no problems using it.

i think can close :)


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -