Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] newlines

From: hijim:pronet at: 6-Nov-2001 20:20

Is there any reason this should not work to be sure there are no more than two newlines in a row in the text? It works fine except for the top of the page. It won't even work if I change it to 'loop 200. It leaves one place with 4 newlines in a row. Maybe there's another character that forces a line feed? loop 20 [replace/all my-area/text "^/^/^/" "^/^/"] Jim ------------------ the whole strip code below foreach [search-string replace-string][ "</" "<" "<p>" "^/" "<h1>" "^/^/" "<h2>" "^/^/" "<h3>" "^/^/" "<h4>" "^/^/" "<li>" "* " "^-" " " "<hr>" ^/----------------------------------^/ "&nbsp;" " " "&copy;" "(C) " "&quot;" {"} "&amp;" "&" ][ replace/all my-area/text search-string replace-string ] parse my-area/text [any [to "<" begin: thru ">" ending: (remove/part begin ending) :begin]] loop 5 [replace/all my-area/text " " " "] loop 20 [replace/all my-area/text "^/^/^/" "^/^/"] replace/all my-area/text ">" ">" replace/all my-area/text "<" "<"