Hi all,
I've got a local variable with a bunch of text lines in it.
I'd like to search for a word and either remove or replace that line.
I could have sworn it was to do with lineDelimiter then
replace line
or delete line
But can't seem to get it to work.
Any help would be greatly appreciated.
Search for a word in a line, replace or delete that line?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Search for a word in a line, replace or delete that line?
Last edited by BarrySumpter on Sat Sep 24, 2011 10:26 am, edited 1 time in total.
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Search for a word in a line, replace or delete that line
Barry...
Have a look at 'lineOffset' in the dictionary.
Dixie
Have a look at 'lineOffset' in the dictionary.
Dixie
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Search for a word in a line, replace or delete that line
Yep! Thats it! Much Appreciated!
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Search for a word in a line, replace or delete that line
Hi Barry,
See "replace" in LC dictionary also.
Best
Jean-Marc
See "replace" in LC dictionary also.
Best
Jean-Marc
https://alternatic.ch
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Search for a word in a line, replace or delete that line?
No wonder I couldn't remember it.
So freakin simple.
I have to write that lineOffset is so weird and hard to remember for me.
But that's LiveCode.
Code: Select all
put lineOffset(tFindWhichWord, MyData) into tWhichLineFound
if tWhichLineFound > 0 then
put myNewLine into line tWhichLineFound of MyData -- Replaces the line
end if
I have to write that lineOffset is so weird and hard to remember for me.
But that's LiveCode.
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.