REplace issue in livecode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 3
- Joined: Tue Jan 14, 2025 8:03 am
REplace issue in livecode
Hello,
I'm new to LiveCode. I need to replace " snn" with "" & " sss" & "" in myHtml. it will replace all " snn" with " sss". but it will not work in the begin of a line(newline, \n).
Is there anyone having the same issue? How to fix it?
I'm new to LiveCode. I need to replace " snn" with "" & " sss" & "" in myHtml. it will replace all " snn" with " sss". but it will not work in the begin of a line(newline, \n).
Is there anyone having the same issue? How to fix it?
Re: REplace issue in livecode
Hi Helen,
welcome to the forum!
What did you script so far?
Please post your script(s).
Best
Klaus
welcome to the forum!
What did you script so far?
Please post your script(s).
Best
Klaus
Re: REplace issue in livecode
What is it about myHtml that is different from "normal" text?
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 38
- Joined: Tue Jun 27, 2006 8:35 pm
- Contact:
Re: REplace issue in livecode
When you say that "it will not work" do you mean that the leading white space in " sss" is not included in the replace... or something else?
Also, I am uncertain why there is an empty "" concatenated to the front and back of " sss". I wouldn't think that this would be functionally different from just " sss"
Additionally, you use "\n" to represent a new line which I assume is additional clarification for us about what "new line" means. I wouldn't actually expect to see "\n" used in html but rather "<br/>"
Also, I am uncertain why there is an empty "" concatenated to the front and back of " sss". I wouldn't think that this would be functionally different from just " sss"
Additionally, you use "\n" to represent a new line which I assume is additional clarification for us about what "new line" means. I wouldn't actually expect to see "\n" used in html but rather "<br/>"
Elementary Software
...now with 20% less chalk dust!
...now with 20% less chalk dust!
-
- Livecode Opensource Backer
- Posts: 10077
- Joined: Fri Feb 19, 2010 10:17 am
Re: REplace issue in livecode
It is possible the OP is a bot: they joined the day that was posted and seems to have no direct connexion with LC as it concerns HTML.
Whoops: I apologise.
Whoops: I apologise.

Last edited by richmond62 on Wed Jan 15, 2025 10:47 am, edited 1 time in total.
-
- Posts: 3
- Joined: Tue Jan 14, 2025 8:03 am
Re: REplace issue in livecode
Thanks for your answer. I got it.
Re: REplace issue in livecode
It would be good style to tell us what the problem and its solution was! 

Re: REplace issue in livecode
I'm on the fence for this one. For someone new to LC she seems to know a lot about LC in another very old thread. viewtopic.php?f=11&t=39417&p=232984#p232984richmond62 wrote: ↑Wed Jan 15, 2025 8:52 amIt is possible the OP is a bot: they joined the day that was posted and seems to have no direct connexion with LC as it concerns HTML.
Whoops: I apologise.![]()
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com