Re: Getting value of SRC in tag between quotes - regex

"Larry Leszczynski" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
Hi Summer -

> I have a need to extract ONLY the contents between the "" in a tag from
> the src.

Take a look at: 
http://template-toolkit.org/docs/manual/VMethods.html#method_match

E.g. something like this should work:

[%
  somevar = '<img src="getthistextrighthere" id="someid">';
  matches = somevar.match('src="([^"]*)"');
  src_contents = matches.0;
%]

HTH,
Larry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.