GCF GRAB a new line character

Hello,

I am a newbie to these forums and am in need of help. I am in a situation where I need to retrieve a newline character from a search statement. The code area looks like this:

<GET a:url="${properties.timeStampURL}" a:query="" a:redirect="no" />
<SEARCH a:symbol="tmStamp" a:source="${_RESPONSE}" a:value="${_VALUE}" >
<GRAB a:start="timestamp=" a:end="\\r" />
</SEARCH>

When tracing through the logs I can see that the GET execution is returning the following:

>>> << "[0x9][0x9]timestamp=1156280064989[\r][\n]"
[2006-08-22 16:44:20,730] [DEBUG] Thread-5:/skill/Authenticate org.apache.commons.httpclient.Wire.wire:105

Has anyone come across this particular situation or anything similar to this in the past.

Any help is much appreciated

Thanks Much

Chris

0
No votes yet

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

RE: GCF GRAB a new line character

Hi Chris,

I know your post has been out here for a while, but I'm wondering if you ever figured out how to do a grab to the end of the line?

Thanks...Ginny
Ginny Lee...Colorado School of Mines

Same here

I need to grab "across" two lines as there is no unique start string in the same line as the needle.

GCF GRAB

Well, if you want to grab it from the header you don't have to necessarily
include the "a:end" attribute. The example below grabs the entire URL all
I had to was give the "a:start" attribute and it grabs the rest.

< SEARCH a:symbol="URL" a:source="${_RESPONSE_HEADERS}" a:value="${_VALUE}" >
< GRABFROMHEADER a:name="Location" a:start="//" />
< /SEARCH >

I'm inclined to believe that "< GRAB >" works the same as "< GRABFROMHEADER >";
except for the fact that you might, actually, need an "a:end" attribute. Just try
leaving the "a:end" attribute empty, or just leave it with an empty space. I think
that might work but I don't remember. Let me know!!!! lol

If that works you should be able to do 2 searches and concatenate the "a:symbol" names of
each (e.g. ${URL} ${URL2}) this should produce the desired results that you need.