Hey all can i ask someones help i need to to remove ALL html formatting for a html string, big problem i have found the newline in the file is not equling ""
so its not removing the line returns.
Any ideas?
What would be the simplist way to stip ALL html code?
Quote:
Originally Posted by rexzooly
Hey all can i ask someones help i need to to remove ALL html formatting for a html string, big problem i have found the newline in the file is not equling ""
so its not removing the line returns.
Any ideas?
What would be the simplist way to stip ALL html code?
Hi! ...
Quote:
Originally Posted by Mikhail
Hi! Please, try with " " (unix/linux style). CR+LF ( ): DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS. LF (" "): Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and ...
Quote:
Originally Posted by rexzooly
OK your a star that works anyway to detect if its using or ?
Hi! Sorry, I cannot understand what you wrote (I'm Brazilian).
This will strip all html tags
Code:
local strHTML = "String containing HTML"
local strStriped = string.gsub(strHTML, "%b<>", "")
If you want to keep the line breaks then use this first.
Code:
String.Replace(strHTML, "<br>", "", false)
Quote:
Originally Posted by Dermot
This will strip all html tags
Code:
local strHTML = "String containing HTML"
local strStriped = string.gsub(strHTML, "%b<>", "")
If you want to keep the line breaks then use this first .
Code:
String.Replace(strHTML, "<br>", "", false)
...
Quote:
Originally Posted by Mikhail
beautiful and minimalist solution! Thank you!
Just a plus: the "<br>" is used in html, but in xhtml the "<br />" is used. So:
Code:
String.Replace(strHTML, " <br /> ", "", false)
Is not correct, but some people write it without a space after the <br , so :
Code:
...
Quote:
Originally Posted by Dermot
This will strip all html tags
Code:
local strHTML = "String containing HTML"
local strStriped = string.gsub(strHTML, "%b<>", "")
If you want to keep the line breaks then use this first.
Code:
String.Replace(strHTML, "<br>", "", false)
OK am i ...
It's a Lua function, it's not an AMS action.
and its string.gsub() not String.Gsup
Quote:
Originally Posted by rexzooly
OK am i been gay cos i can't find the Command String.Gsup am i doing something wrong lol.
Quote:
Originally Posted by Dermot
It's a Lua function, it's not an AMS action.
and its string.gsub() not String.Gsup
can i call that in ams? or will it give me error?
Rex your a tit lol, i never new you could call negative lua like that thanks i think some of my functions i am going to redo for my plugin ...
Quote: Originally Posted by Mikhail beautiful and minimalist solution! Thank you! Just a plus: the "<br>" is used in html, but in xhtml the "<br />" is used. So: Code: String.Replace(strHTML, " <br /> ", "", false) Is not correct, but some people write it without a space after the <br , so : Code: String.Replace(strHTML,...
Quote: Originally Posted by rexzooly Hey all can i ask someones help i need to to remove ALL html formatting for a html string, big problem i have found the newline in the file is not equling "" so its not removing the line returns. Any ideas? What would be the simplist way to stip ALL html code? Hi! Please, try with " " (unix/linux style). CR+LF ( ): DEC RT-11 and most other early non-Unix, non-IBM OSes,...
It's a Lua function, it's not an AMS action. and its string.gsub() not String.Gsup Quote: Originally Posted by rexzooly OK am i been gay cos i can't find the Command String.Gsup am i doing something wrong lol.
This works with Lua 5.0.2. http://www.lua.org/pil/20.1.html Some examples: Code: s = [[then he said: "it's all right"!]] a, b, c, quotedPart = string.find(s, "([\"'])(.-)%1") print(quotedPart) --> it's all right print(c) --> " Code: date = "17/7/1990" _, _, d, m, y = string.find(date, "(%d+)/(%d+)/(%d+)") print(d, m, y)...
I had to remove all string replace commands for any... I had to remove all string replace commands for any variable that I didn't use in my HTML template. Weird. But working! So happy happy!
01:20 PM September 22, 2008
from web
Thread profile page for "String.Replace HTML Help" on http://www.indigorose.com.
This report page is a snippet summary view from a single thread "String.Replace HTML Help", located on the Message Board at http://www.indigorose.com.
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity