Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: String.Replace HTML Help

Started 1 month, 2 weeks ago 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?
Site: Indigo Rose Software Forums  Indigo Rose Software Forums - site profile
Forum: AutoPlay Media Studio 7.0 Discussion  AutoPlay Media Studio 7.0 Discussion - forum profile
Total authors: 4 authors
Total thread posts: 13 posts
Thread activity: no new posts during last week
Domain info for: indigorose.com

Other posts in this thread:

Mikhail replied 1 month, 2 weeks ago
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! ...

rexzooly replied 1 month, 2 weeks ago
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 ...

rexzooly replied 1 month, 2 weeks ago
OK your a star that works anyway to detect if its using or ?

Mikhail replied 1 month, 2 weeks ago
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).

Dermot replied 1 month, 2 weeks ago
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)

Mikhail replied 1 month, 2 weeks ago
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) ...

rexzooly replied 1 month, 2 weeks ago
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: ...

rexzooly replied 1 month, 2 weeks ago
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 ...

Dermot replied 1 month, 2 weeks ago
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.

rexzooly replied 1 month, 2 weeks ago
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 ...

 

Top contributing authors

Name
Posts
rexzooly
7
user's latest post:
String.Replace HTML Help
Published (2009-11-11 04:25:00)
Quote: Originally Posted by Mikhail beautiful and minimalist solution! Thank you! Just a plus: the &quot;&lt;br&gt;&quot; is used in html, but in xhtml the &quot;&lt;br /&gt;&quot; is used. So: Code: String.Replace(strHTML, &quot; &lt;br /&gt; &quot;, &quot;&quot;, false) Is not correct, but some people write it without a space after the &lt;br , so : Code: String.Replace(strHTML,...
Mikhail
3
user's latest post:
String.Replace HTML Help
Published (2009-11-10 04:25:00)
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 &quot;&quot; so its not removing the line returns. Any ideas? What would be the simplist way to stip ALL html code? Hi! Please, try with &quot; &quot; (unix/linux style). CR+LF ( ): DEC RT-11 and most other early non-Unix, non-IBM OSes,...
Dermot
2
user's latest post:
String.Replace HTML Help
Published (2009-11-11 04:25:00)
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.
Sakuya
1
user's latest post:
String.Replace HTML Help
Published (2009-11-11 04:25:00)
This works with Lua 5.0.2. http://www.lua.org/pil/20.1.html Some examples: Code: s = [[then he said: &quot;it's all right&quot;!]] a, b, c, quotedPart = string.find(s, &quot;([\&quot;'])(.-)%1&quot;) print(quotedPart) --&gt; it's all right print(c) --&gt; &quot; Code: date = &quot;17/7/1990&quot; _, _, d, m, y = string.find(date, &quot;(%d+)/(%d+)/(%d+)&quot;) print(d, m, y)...

Related threads on "Indigo Rose Software Forums":

Related threads on other sites:

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