Match text via Regex that is within an HTML tag -


Through a Regex, I'm trying to match the word one , only When he & lt; P & gt; tag.

  1. & lt; P & gt; Zero One Two Three & lt; / P & gt;
  2. Zero one two < P & gt; Three & lt; / P & gt;
  3. & lt; P & gt; Zero A & lt; B & gt; Two & lt; / B & gt; & Lt; / P & gt; & Lt; P & gt; Three & lt; / P & gt;
  4. & lt; P & gt; Two & lt; / P & gt; Three should be a match

    above # 1 and # 3. It seems that I need a letterhead which ensures that a closing tag comes first without an opening and

    tag which does the opposite). But there is nothing to come up with the correct expression. Any idea is appreciated.

    You can enter the string one which is & lt; P & gt; is inside the tag.

      \ bone \ b (? = (?!? & Lt; \ /? P & gt;).) * )   



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -