SRL Archive - NOTA

Need help editing/rearranging some text (removing spaces)


YoHoJo

2013-09-01 20:56:46

When I have the text on notepad it looks like it's all in one line, but when I paste it onto Microsoft Word or into a forum post box it gets all split up.
Ex:

On Notepad
From: sacredstriker


When copy/pasted onto forums:
[QUOTE=
sacredstriker
;12700900]

Any quick/easy way to edit them all to remove the spaces?

rj

2013-09-01 21:55:15

Do you mean like some code that could do it?

http://villavu.com/forum/showthread.php?t=82205 I couldn't find anything but you could relook I'm sure @Janilabo has some magic code that could do this automatically

YoHoJo

2013-09-01 22:05:12

Just need it done (for me) in any way possible. :)

Ian

2013-09-01 22:36:42

Try one of these? Can't test atm because no mobile version, but I've used something similar before http://www.textfixer.com/tools/remove-white-spaces.php http://textmechanic.com/Remove-Extra-Spaces.html

YoHoJo

2013-09-01 22:59:04

From: BMWxi
Try one of these? Can't test atm because no mobile version, but I've used something similar before http://www.textfixer.com/tools/remove-white-spaces.php http://textmechanic.com/Remove-Extra-Spaces.html


Ohh very cool! Neither worked but I'll search around for some more.

CynicRus

2013-09-03 09:37:11

Fixed. This is not spaces, this is end of line chars aka #13 #10 , I think that is bug in Delphi's regexp.http://villavu.com/forum/showthread.php?t=105676&p=1263874#post1263874

grats

2013-09-05 00:06:34

in word & remove lines in between or w/e
double spaces

Brandon

2013-09-05 14:22:25

Use a non-greedy regex to find all the "
From: ....
" strings..


String NewLineSpace = "(([\\r\\n]+)|(\\s))";
String Regex = "\\[QUOTE=" + NewLineSpace + "(.*)?" + NewLineSpace + "(.*)?\\]";

Use the above regex.. Then replace all NewLineSpace matches within the found quote string with an empty string.

Simple enough. You can just replace the NewLineSpace groups as well.. I didn't expect to see "need it done (for me)".. Not sure how that works.