E
Earl Teigrob
I am parsing some HTML and need to match certain tag attributes to change
from relative to absolute urls.
The search string I am currently using is
rex="src\\s*=\\s*\"(?<content>.+?)\"";
that matches all src attributes on the page (and it works, by the way, but
is doing extra work)
However, I really do not need to match attributes that where the address
starts with "http://"
Of course to match all occurances of this "http://" is quite easy by using
rex="src\\s*=\\s*\"(?<content>http://.+?)\"";
BUT
What about just the opposite? How can I match all occurances of the src
attribute where the url DOES NOT start with "http://"?
Something like
rex="src\\s*=\\s*\"(?<content>[^(http://)].+?)\""; //DOES NOT WORK
or can this be done???
Earl
from relative to absolute urls.
The search string I am currently using is
rex="src\\s*=\\s*\"(?<content>.+?)\"";
that matches all src attributes on the page (and it works, by the way, but
is doing extra work)
However, I really do not need to match attributes that where the address
starts with "http://"
Of course to match all occurances of this "http://" is quite easy by using
rex="src\\s*=\\s*\"(?<content>http://.+?)\"";
BUT
What about just the opposite? How can I match all occurances of the src
attribute where the url DOES NOT start with "http://"?
Something like
rex="src\\s*=\\s*\"(?<content>[^(http://)].+?)\""; //DOES NOT WORK
or can this be done???
Earl