in reply to regex help please!
(something = ")tenpixblack">TEXT To GET.
m!.*(?=tenpixblack">) # anything, until position before '=tenpixblack" +>' =tenpixblack"> # now match '=tenpixblack' (TEXT To GET.) # capture 'TEXT To GET.' !gx; # global, extended syntax $wanted = $1; # assign captured ($1) to $wanted...
Warning incomplete code... addressing only the regex, in part because of your incomplete question
Warning 2You've indicated two different capitalization styles for TEXT ( To | TO ) GET. The snippet above only deals with the one with the lower-case "o"; if you need both, add an 'i' flag at the end of the regex... but only if that won't cause unwanted matches on text which is fully capitalized
And, most important, please read about asking questions How do I post a question effectively?, Writeup Formatting Tips and even Perl Monks Approved HTML tags ... and show us what you've tried, as that inspires the inclination to answer.
|
|---|