On 2 March 2012 19:37, Brian Devaney <[email protected]> wrote:

[Please use plain text]


> I am trying to use the Regular Expression Extractor to process search results 
> from a web service call.  I have a regex that correctly identifies the data I 
> want, but I do not know why it does not get assigned to the reference name.
>

So what does the reference name get set to?

> The extractor is set to apply to the main sample only. with the body 
> (unescaped) option selected.  The other settings are:
> regex: docid=&quot;(\w{32})&quot;
> Template: $1$
> Match No.: 0

Do you really want a random match?

> Default Value: NOT FOUND
>
> A small section of the data that is returned and that I am trying to get a ID 
> pulled from is:
>
>   &lt;/columns&gt;&lt;result 
> docid=&quot;8a8a823435cf9a2c0135d03b08350388&quot; 
> docTypeId=&quot;8a8a823435cf5cd60135cf6ca97a3b7e&quot;
>
> As part of the regex, I have also tried \w* and \w*?

You could also use

[a-f0-9]+

as the value seems to be lowercase hex.

> The idea is to get the unique identifier with the surrounding quotes stripped 
> off.  I have Mozilla Firefox's Regular Expression Tester and the regex does 
> find the right ID along with the quotes and docid=.

However, the Firefox plugin may not be using the same RE engine - or
indeed using exactly the same input data.

> From the help, it looks like the parenthesis indicate which part of the 
> string that matches is to be assigned to the Reference Name variable.

Yes.

> Thank you for your help.
>
> --
>
> Brian Devaney
> Software Developer
> DocFinity®
> (814) 238-0038x274
> mailto:[email protected]
> http://www.docfinity.com/
>
>
>
> DISCLAIMER: This email may contain proprietary information, some or all
> of which may be legally privileged. It is for the intended recipient
> only. If an addressing or transmission error has misdirected this email,
> please notify the author by replying to this email. If you are not the
> intended recipient, you may not use, disclose, distribute, copy, print,
> or rely on this email.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to