On 6/11/09 at 12:45 PM, [email protected] (JohnL) wrote:

>There oughta be a way to accomplish this task:

>I want to turn the numerals in these lines

>>lorem ipso 240
>>nother ipso 241
>>mas ipsos 242
>> ...
>>fini ipsos 26x

>into new numbers so that this is the result

>>lorem ipso 487
>>nother ipso 488
>>mas ipsos 489
>> ...
>>fini ipsos 50x

>Solutions preferred, but hints accepted.

I assume in the last line the x is being substituted for a digit 
and what you are trying to accomplish is to have the lines 
numbered sequentially starting with 487 with the line numbers at 
the ends of the lines. You can accomplish this in a two step process.

First, use the menu item Text->Add/Remove Line Numbers... Fill 
the dialog box to indicate starting with 487 and incrementing by 
1. I will also assume the box include space after number is 
checked. This will put the line numbers at the start of each 
line followed by a space. Once that is accomplished the desired 
result can be achieved using grep as follows:

search for

^(\d+) (.+ )\d+

replace with

\2\1


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
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 specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to "[email protected]" 
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to