IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Page 2 of 2 < 1 2
Topic Options
#46366 - 01/08/14 03:46 PM Re: search and replace [Re: Walli]
Walli Offline
OL Expert

Registered: 02/13/13
Posts: 320
Loc: Ontario
Many thanks to Support team for taking care of this call for me.
It's all done perfectly as expected.

MERCI

Top
#46372 - 01/09/14 11:16 AM Re: search and replace [Re: Walli]
Walli Offline
OL Expert

Registered: 02/13/13
Posts: 320
Loc: Ontario
Hi Raphael, Support team help me to do this in code but it's also nice to know we can do things different ways.
Thank you once again

Top
#46775 - 02/17/14 04:41 PM Re: search and replace [Re: Walli]
Adrian_C Offline
OL Newbie

Registered: 02/17/14
Posts: 1
Hello, I would also need help on this similar topic. I am trying to search the data for a specific string, and put that entire line in a String Variable.

How do I go about getting the entire line after using the find() function?

example:

PP is declared as a string

if(find('PURCHASE PRICE',2,2,37,80))
&PP := %Store entire line where PURCHASE PRICE is found
endif()

Top
#46789 - 02/18/14 09:53 AM Re: search and replace [Re: Walli]
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
Find only returns a yes or no, it doesn't tell you where it found the search string.
To do that you need to check each line one by one.
for(&current.line,1,1,37)
if(pos('PURCHASE PRICE',@(&current.line,1,80))>0)
exit
endif
endfor()
&PP := @(&current.line,1,80)

Top
Page 2 of 2 < 1 2