Join Lines that are breaking
-
Hi Terry,
Awesome Job ! :)
That worked like a charm on data of 783 rows!
I used this;
Find: \R(?!\d{2}~\d{16}~\d{4}~)
Because my data would always be like the following format;
“01~000002~0003”Thanks a million guys !!! This has literally saved me a lot of time, especially since i’ve got to keep running the report and updating it!
I can now move on to my next report which has a similar issue ! :) This has save
-
What would be the best way to go joining broken lines with the following format?
Status,Company Number,Order Description,Owner,Order Number,Ordered Date,Creation Date,Supplier Name,Supplier Number,Product Code,Product,Quantity Ordered,Quantity Unit,Net Unit Price,Required Delivery Date,Quantity Received,Actual Delivery Date,Cost Centre,Cost Centre Description,Account Code,Account Code Description,Analysis Code,Analysis Code Description,Sub Account Code,Sub Account Code Description,Line Net Sum,Line VAT Sum,Line Gross Sum,Cluster,Region,
(there are three commas after region, but it’s not showing up here)
-
Glad my regex did so well, and I hadn’t even tested it. I’m actually new to this as well. I had a similar issue and others helped me so I feel it’s time to pay that forward (where I can).
As to your latest question. The concept of the regex I supplied will work with some minor amendments. Some assumptions are made:
- the 3 commas will only appear at the end of the line
- nothing will ever appear between the 3 commas
Find: (?!,)\R
Replace: <empty line> so nothing goes in the replace fieldI had in my previous answer \1 in the replace field, I don’t actually think that was necessary, the same goes for this regex.
So the expression says look for a CR/LF and so long as it doesn’t appear directly behind 3 commas, then delete it.
I am a bit concerned though that you have 3 commas together and the format suggests that commas are used between all fields. Are you sure that the 3 commas will never have data between them?
Terry
-
Slight typo in my last regex, it should have been
(?!,)\R
Somehow only 1 comma had appeared where there should have been 3 together.Terry
-
So I’m not going mad. Something is happening to my typing. I know for certain that I typed 3 commas together in that last regex. Yet on my screen it’s only showing 1.
This will be a test. In all cases 3 commas should appear together.
,
“,”
/,/,/,/
/, , ,/
Where I’m typing I have the 3 commas, on the right side is a preview, and that only shows 1 in the first 2 cases. The other 2 have another character between commas so they show correctly in preview.Now I need some assistance. Can anyone provide me an answer to why my characters are going missing?
Terry
-
Ryan, i have the answer as to why your 3 commas (and mine) didn’t show. The box you type in is an interpreter and displays what it believes you really wanted. I found another post which alerted me to what will be my most favourite character on this forum going forward, the grave accent. That’s the one on the same key as your ~, thus “`”.
If I type what my regex should have been using this around the characters it should come out correctly. It will also come out highlighted.Find:
(?!,,,)\R
My preview is showing it correctly, lets hope it posts it the same way.
Can anyone provide a FAQ on this markup/Markdown (I’ve seen something that says it’s called Markdown) interpreter? I’m looking but unsure of where it should be.
Terry
-
When you reply to a post, in the upper-right corner of the typing window is the word
COMPOSE ?
. Click on that question mark. It pops up a window with a link to the Markdown documentation. -
Hi, @terry-r and All,
In addition to Peter’s information about Markdown syntax, there is also a N++ Markdown Viewer plugin, though I have not tested it, yet !
Refer to :
https://github.com/nea/MarkdownViewerPlusPlus
And the latest
v.0.8.2
release, either in32
and64
bits, can be downloaded from below :https://github.com/nea/MarkdownViewerPlusPlus/releases
Best Regards,
guy038
-
I occasionally use the MarkdownViewer++ plugin… it works fairly well for rendering markdown that I’m editing in Notepad++ (though, often for posts, I just edit them in the forum / browser window with the preview visible). But the MarkdownViewer++ plugin doesn’t collapse multiple commas, whereas this forum does (both at preview and after posting). I spent about 10min googling
markdown comma
and similar, but I wasn’t able to find any documentation that claims markdown does it. Unfortunately,nodebb comma
didn’t find anything saying it’s the forum software, either. So the collapsing commas are a mystery to me.Also, @Scott-Sumner was thinking about turning this old post into an entry on our FAQ Desk, but apparently hasn’t found the Round Tuit™ yet.
-
Also, @Scott-Sumner was thinking about turning this old post into an entry on our FAQ Desk, but apparently hasn’t found the Round Tuit™ yet.
I have begun getting “roun-tuit” but until it is in a form that has at least as much value as the old post there is little value in publishing it. It’s a time-available thing…if you have time, you are of course free to make it way better than I ever could–I’d gladly delete my in-progress draft if something good by someone else magically appears as a FAQ Desk posting. :-)