Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 236BB10B05 for ; Tue, 3 Sep 2013 18:37:09 +0000 (UTC) Received: (qmail 77559 invoked by uid 500); 3 Sep 2013 18:37:08 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 77321 invoked by uid 500); 3 Sep 2013 18:37:08 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 77305 invoked by uid 99); 3 Sep 2013 18:37:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Sep 2013 18:37:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-wg0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Sep 2013 18:37:02 +0000 Received: by mail-wg0-f52.google.com with SMTP id m14so3657370wgh.19 for ; Tue, 03 Sep 2013 11:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HZQsbjahb02Rxlfd72imO57E2lWsKk76Q3qhPG/1q1I=; b=an1L2pfmNoXWGFJJqvSUJTcD6ai3cRZPjhwpQHCHTyODIx3UVSpptiO2AwauFPVNoD JPgQgOYEAppUfLAU04vnX2DLmHSVmbbqqsnm3uKrRsJ6ACTjLHgYkjfzj/Wd6X+QvG1M 0HF5o52a0rxURXlwt15Uf55w3zBe06fuubLK4JK7FCWUd/34Cc5plx5CPeeS4d0+aikM R/ySTdQIRuriwFyotLZ7nn8NBwY1YdpUA6HSUJRuZNuhianw6C7SK0/vHBuhf2kh9mgf N0asBM7FLEHQP+FHG8oTS46sqZMbGyUjrnKdeY8dZqG/XY8p/26qfcgEv/wpoIpF6k7B lmqw== MIME-Version: 1.0 X-Received: by 10.180.37.227 with SMTP id b3mr11697233wik.24.1378233401016; Tue, 03 Sep 2013 11:36:41 -0700 (PDT) Received: by 10.194.16.167 with HTTP; Tue, 3 Sep 2013 11:36:40 -0700 (PDT) In-Reply-To: References: Date: Tue, 3 Sep 2013 19:36:40 +0100 Message-ID: Subject: Re: Regular expression extractor for spider From: sebb To: JMeter Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 3 September 2013 19:08, Jordi Carretero wrote: > Hi > > I'm building a spider using a regular expression extractor and a for-each- > controller and works pretty well but.. > > I'm using to extract links like: > > > but I can not find any expression that will work at the same time for > expressions found in some sites like: > > > that include the full domain at the beginning (and has to be removed) > > It's a matter of working with the perl expression but after some days I > could not manage to make it work, so any help will be appreciated If you want to ignore an optional string, use something like: (?:http://www\.mysite\.es)? The form (abc)? means abc or nothing; the (?:) form means don't save the contents. In your case, if you want to ignore both ".", ".." and "http:/www.mysite.es" you could use: (?:http://www\.mysite\.es|\.\.?)? BTW, rather than use "[.]" to escape the meta-character ".", the usual method is "\.". > Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org For additional commands, e-mail: user-help@jmeter.apache.org