Re: Mod_Substitute - Match the last occurrence of a string in the response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Never used mod_substitute - but the standard PCRE way is s/(.*)<meta... >/$1..../mxs - the .* will capture greedily - so captures all but last meta...



On 22/11/2016 16:50, Mayuresh wrote:
Hi,

How can I check for the last occurrence of a string in the response html and only replace the last occurrence of it?

I want to search for the last "meta" tag in the response and replace it with something.

How can I do this?

Thanks,
Mayuresh


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux