Maurizio --
Most of what you want to do should be doable by doing three steps,
rather than one.
1) Do a find/replace on ', ' (comma, space) to r ; this will put
each item on its own line
2) Use the sort function
3) do a find/replace on r to ', ' to put things back on a line.
If necessary, you can also do this line by line using the 'only in
selection' choice in BBEdit
However, I'd be remiss if I didn't point out that the better way to
do this would be in a spreadsheet program (Excel, any number of
clones, Numbers in iWork, etc) or in a database. Not sure why you feel
the urge to do it in BBEdit and I'm not judging; but from what info we
have so far it would seem a natural fit.
David
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }
On Thu 10/12/09 02:14 , Maurizio Gennaro Cataldo wrote:
Hi there,
I really do not figure out how to implement a sorting task which
involves items
inside a line of text.
I know that BBEdit is able to sort lines but what I need is
something different.
The task is quite simple, let's say we have a line of text
containing comma
separated items, something like:
orange, apple, pear, 1banana, 2apricot, bombay
and after having selected the whole line I would like to push a
combination of keys
(something like cmd+O) or select a script and obtain something like:
apple, 2apricot, 1banana, bombay, orange, pear
In other words I would like to alphabetically order the comma
separated items
inside the line disregarding any optional number that could appear
as first characters
at the beginning of some items.
Any suggestion will be really appreciated.
Best regards
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the
group.
Follow @bbedit on Twitter:
Links:
------
[1] http://groups.google.com/group/bbedit?hl=en
[2] http://www.twitter.com/bbedit
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>