Re: [users@httpd] Mod_Substitute - Match the last occurrence of a string in the response

2016-11-23 Thread Mayuresh
Any suggestions? On Nov 22, 2016 11:32 AM, "Mayuresh" wrote: > Is there a way to make a 2 pass substitution? 1st one removing all the > \n's and then using another one to substitute the string that I want? > > On Tue, Nov 22, 2016 at 11:15 AM, Mayuresh > wrote: &

Re: [users@httpd] Mod_Substitute - Match the last occurrence of a string in the response

2016-11-22 Thread Mayuresh
Is there a way to make a 2 pass substitution? 1st one removing all the \n's and then using another one to substitute the string that I want? On Tue, Nov 22, 2016 at 11:15 AM, Mayuresh wrote: > Hi Jason, > > I tried it: > > Substitute "s%(]*>).*?$%$1window['st

Re: [users@httpd] Mod_Substitute - Match the last occurrence of a string in the response

2016-11-22 Thread Mayuresh
Hi Jason, I tried it: Substitute "s%(]*>).*?$%$1window['start-time'] = new Date().getTime();window['app-key'] = \"xxx\";%i" However it still replaces each line that the meta tag appears on. Regards, Mayuresh On Tue, Nov 22, 2016 at 11:12 AM, Mayu

Re: [users@httpd] Mod_Substitute - Match the last occurrence of a string in the response

2016-11-22 Thread Mayuresh
Hi Jason, Each meta tag is appearing on a separate line. Will it work even then? Trying it out any ways. Thanks, Mayuresh On Tue, Nov 22, 2016 at 10:41 AM, Jason Brooks wrote: > Hello, > > According to the Apache Glossary page > <https://httpd.apache.org/docs/current/glos

Re: [users@httpd] Mod_Substitute - Match the last occurrence of a string in the response

2016-11-22 Thread Mayuresh
for the last occurrence. James, I tried your suggestion, but it works for all the lines. On Tue, Nov 22, 2016 at 9:51 AM, bob gailer wrote: > On 11/22/2016 11:50 AM, Mayuresh wrote: > >> Hi, >> >> How can I check for the last occurrence of a string in the response htm

[users@httpd] Mod_Substitute - Match the last occurrence of a string in the response

2016-11-22 Thread Mayuresh
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