A
Aldric Giacomoni
I need to delete a sequence of characters like '\\n' from a string - but I don't want to delete every 'n' and every '\' from it! So .. "delete" doesn't seem to be an option and I can't get "gsub" to do what I want. Is there a tried and true solution that I just haven't found? Here is an example test, straight from the document itself:
Soft linebreaks are linebreaks preceeded by '\\' like this one >o\
k<. Hard line breaks are all other linebreaks.
Soft linebreaks are converted to >nothing<, i.e. removed.
Note that linebreaks are coded differently on different systems.
Examples (>ok< shouldn't be split):
linebreak 1 "\\n": >o\
k<
linebreak 2 "\\n\\r": >o\
k<
linebreak 3 "\\r\\n": >o\
k<
linebreak 4 "\\r": >o\
k<]
Expected result is that >ok< looks normal on all lines - I don't know how to make that happen. Can anyone enlighten me .. Or put me on the path?
Thanks,
--Aldric
Soft linebreaks are linebreaks preceeded by '\\' like this one >o\
k<. Hard line breaks are all other linebreaks.
Soft linebreaks are converted to >nothing<, i.e. removed.
Note that linebreaks are coded differently on different systems.
Examples (>ok< shouldn't be split):
linebreak 1 "\\n": >o\
k<
linebreak 2 "\\n\\r": >o\
k<
linebreak 3 "\\r\\n": >o\
k<
linebreak 4 "\\r": >o\
k<]
Expected result is that >ok< looks normal on all lines - I don't know how to make that happen. Can anyone enlighten me .. Or put me on the path?
Thanks,
--Aldric