PDA

View Full Version : Find and replace



NewsArchive
10-14-2014, 02:22 AM
Just having a bit of a brain fade after a long day.

I have a long string (a pathname) in which one of the phrases at the end is
"Equine Manager". I want to search the string and replace "Equine Manager"
with "EquineManager". - Take out the space.

I cannot take out all the spaces in the string as the others are valid.

How do I do this please?

Thanks

John

NewsArchive
10-14-2014, 02:22 AM
John,

> I have a long string (a pathname) in which one of the phrases at the end is
> "Equine Manager". I want to search the string and replace "Equine Manager"
> with "EquineManager". - Take out the space.

The correct way, create a local variable and put the text there once
you do that find each use and update that instance with an embedded
variable. Now you can change it in ONE location and cover your bases.

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
10-14-2014, 02:23 AM
Right from the horses mouth:

Now hold your horses and get off that high horse!

Hope he doesn't get a charley horse from all that keyboarding, but no
use beating a dead horse.

BTW, wild horses couldn't stop me from this horsing around.

Hope he's REALLY SO SO hungry (and thirsty too, but you can't make
him..).

I guess I'll finally put this post out to pasture, but a nod is as
good as a wink to a blind horse.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
10-14-2014, 02:23 AM
Clever

Dan Scott

NewsArchive
10-14-2014, 02:24 AM
Sorry Lee with all due respect you're telling me what I know. I guess what
I'm asking is HOW do I do that?

Anyone got a code snippet, an example please of a Find and Replace in SB?

Thanks

John

NewsArchive
10-14-2014, 02:24 AM
BTW I have some code that can replace the complete line, but what I am
struggling with is how to replace a subset of that line.

So for example say I have:

"The cat sat on the mat" I want to replace the word "cat with "dog" to
achieve "the dog sat on the mat".

That is the actual problem. I cannot find a find/replace function in SB as I
would find in a programming language. But I am sure it is obvious. Just
cannot see it.

Thx.

John

NewsArchive
10-14-2014, 02:24 AM
Ah hah found it. Handle string function. Probably a combination of Split
Source String and Remove Blanks will do it.

John

NewsArchive
10-14-2014, 02:26 AM
John,

> Ah hah found it. Handle string function. Probably a combination of Split
> Source String and Remove Blanks will do it.

Nope, even easier...


Set Variable %YADA% to "Dog"

Display Message Box "The cat sat on the mat" -- "Something"

Display Message Box "The %YADA% sat on the mat" -- "Something"

Set Variable %YADA% to "cat"

Display Message Box "The %YADA% sat on the mat" -- "Something"

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
10-16-2014, 10:31 AM
Horses for courses I suppose :-)

J André Labuschagné

NewsArchive
10-17-2014, 02:00 AM
Main course?

Russ Eggen
RADFusion International, LLC

NewsArchive
10-17-2014, 02:00 AM
:-)

J André Labuschagné

NewsArchive
10-17-2014, 06:34 AM
> Main course?
>
> On 10/16/14 12:21 PM, J André Labuschagné wrote:
>> Horses for courses I suppose :-)

Only at McDonalds<g>.


:-)

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

cjeByteMeSpammers@lansrad.com (remove the "ByteMeSpammers" to email me)
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
10-17-2014, 06:35 AM
lol

J André Labuschagné