Can I do a 'sort lines...' based on how many times a particular character
appears in the line?

I have several files of street addresses that will eventually end up in a
single csv. Some lines have more separating commas than others and I'd like
to sort each file according to how many commas appear in a line.

Even better would be to use just the commas that appear after the final \ as
in the example below:

CD 6\C\Company, Unit 2 Little Place, Clarke Road N10\Company, Unit 2 ,Little
Place, Clarke Road ,N10
CD 8\L\Flat C, 64 Lime Road N11\Flat C, 64 ,Lime Road ,N11
CD 7\B\Broad Street N6\Broad Street ,N6

becomes

CD 7\B\Broad Street N6\Broad Street ,N6
CD 8\L\Flat C, 64 Lime Road N11\Flat C, 64 ,Lime Road ,N11
CD 6\C\Company, Unit 2 Little Place, Clarke Road N10\Company, Unit 2 ,Little
Place, Clarke Road ,N10

(the format is disc\start letter\filename\address in csv)
Eventually I'll change the \ into commas, but it suits me to leave them as
they are for now.

Thanks in advance

Rich


-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to