D
darrel
I'm trying to find the opening < and the text of a tag (without the
attributes or closing tags)
This is what I'm using:
(\S[^\s/>]*)
Which, I think, reads as:
(any number of non-whitespace characters [up to a space, /, or >])
Is that correct? I can't get it to work.
If my text is:
<tag
then it returns "<tag" which is what I want.
However, if I have:
<tag/ or <tag>
it instead matches "/" or ">" respectively.
Why?
attributes or closing tags)
This is what I'm using:
(\S[^\s/>]*)
Which, I think, reads as:
(any number of non-whitespace characters [up to a space, /, or >])
Is that correct? I can't get it to work.
If my text is:
<tag
then it returns "<tag" which is what I want.
However, if I have:
<tag/ or <tag>
it instead matches "/" or ">" respectively.
Why?