code_junkie

HTML last tag conditional match

Nov 12th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <EM>is <i>love</i></EM>,<PARTITION />
  2.  
  3. <EM>is <i>love</i>,<PARTITION />
  4.  
  5. if (Regex.IsMatch(subjectString, "</EM>")) {
  6. return null;
  7. } else {
  8. return subjectString;
  9. }
  10.  
  11. if (subjectString.Contains("</EM>")) {
  12. return null;
  13. } else {
  14. return subjectString;
  15. }
  16.  
  17. A((?!</EM>).)*Z
  18.  
  19. ^<EM>(?:(?<!</EM>).)*<PARTITION />$
  20.  
  21. ^<EM>(?:(?<!</EM>).)*<PARTITION />$
  22.  
  23. <EM>w*s*W*S*[^(</EM>)]<PARTITION[ ]/>
Add Comment
Please, Sign In to add comment