Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BD2C6200BC5 for ; Tue, 22 Nov 2016 18:47:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BBBF9160B0C; Tue, 22 Nov 2016 17:47:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 13308160AF1 for ; Tue, 22 Nov 2016 18:47:04 +0100 (CET) Received: (qmail 33037 invoked by uid 500); 22 Nov 2016 17:47:03 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 33026 invoked by uid 99); 22 Nov 2016 17:47:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2016 17:47:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 645B7C0DCC for ; Tue, 22 Nov 2016 17:47:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id DbdcJBlKmHU8 for ; Tue, 22 Nov 2016 17:47:00 +0000 (UTC) Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 773105F36D for ; Tue, 22 Nov 2016 17:47:00 +0000 (UTC) Received: by mail-qk0-f169.google.com with SMTP id n21so35775440qka.3 for ; Tue, 22 Nov 2016 09:47:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=aA9W3usOTFEKheB4Bcv+dOrugv2HgcSIVBfxRch+4UQ=; b=ziP25nBPdnvT1oUcDtmDZYZTxfnvUfn0a7DT8VqC4Y347IAz+oZAARl7HvPmmMsxA7 3YFauEWEUG3qMivPAFUSN/RtW8+0CVZgk+tOOQYNF3t9Dm8k0C/aQT4HI4Jb9gCOltcm Q8ukQp3M4C0Ld/Q1xBBbLKdjqNHayzAm6tfqUNOBCbZzUag+az4jjer2ydzojxzb4vaY q/PHwXo8+OfNV9JeSYgRzMqfyZVfrx2aqg5brpAuiLB+n1OxdTpu7fKL4etiG3i0YC5C lp63AcCfwwJ340hwkrL7eq74EY57V6nBoz7wKJha8LzOeWPrc5HOfRitqM8a68e9gyFo s1Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=aA9W3usOTFEKheB4Bcv+dOrugv2HgcSIVBfxRch+4UQ=; b=CrXTCh6RJ0wsoydhPClyJnFemH+0d+rBt6FhbP0KXImvjBOY/z6StH62T9AUSBCcJR HZuWt4f60aW9kAVGz7c0jJGUgvBsH94mS7frulcmW+cwY5NG1Vj3fnkGadvXapDvSliw wg73W2KNnIgSx5P2MXcibE2LZxwG5nk6f8YvmbdV+Jc+2QJDoHh+Ae09aVV8gbrURTVB fm8hGF1diE9ypGdXaS7EJvI82jjeoRdXzGwQWQRQCWiCmjCts+QXzneYpxvdEt5k62gk 40BRz7n0CstyXAIbVQsHBAQPqkGYLmSGBgEIYFc7a1TNhni88w1Gii/9KnJJPKLoxP6K DseA== X-Gm-Message-State: AKaTC01lyKoJGnZZ9zwq+9IduFPCWIQfCVWw0r3ZDgJBTre8oy5DoUXUzLF3U8rUSOXP5Q== X-Received: by 10.55.23.213 with SMTP id 82mr23415807qkx.40.1479836819344; Tue, 22 Nov 2016 09:46:59 -0800 (PST) Received: from [192.168.1.104] (cpe-24-211-133-163.nc.res.rr.com. [24.211.133.163]) by smtp.gmail.com with ESMTPSA id b16sm14269418qkg.41.2016.11.22.09.46.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 09:46:58 -0800 (PST) To: users@httpd.apache.org References: From: bob gailer Message-ID: Date: Tue, 22 Nov 2016 12:46:29 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [users@httpd] Mod_Substitute - Match the last occurrence of a string in the response archived-at: Tue, 22 Nov 2016 17:47:05 -0000 On 11/22/2016 11:50 AM, 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. Hi. I am new to Apache, so my questions and answers may not be adequate. By "response" I assume Apache has received a request and you are dealing with the response to that request. There may be a "hook" in Apache that lets you intercept that response and edit it. Someone else will have to explain how to handle that. OR - What is generating the response? (Example: an HTML document, a PHP page you have written, a Python program, or what)? Bob --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org