Re: Regex arithmetic

2017-08-07 Thread porphyry5
On Saturday, August 5, 2017 at 2:09:41 PM UTC-7, ZyX wrote: > 2017-08-05 23:27 GMT+03:00 porphyry5 : > > On Friday, August 4, 2017 at 10:03:16 AM UTC-7, porphyry5 wrote: > >> :h submatch( includes > >> Example: > >> :s/\d\+/\=submatch(0) + 1/ > >>

Re: Regex arithmetic

2017-08-05 Thread Nikolay Aleksandrovich Pavlov
2017-08-05 23:27 GMT+03:00 porphyry5 : > On Friday, August 4, 2017 at 10:03:16 AM UTC-7, porphyry5 wrote: >> :h submatch( includes >> Example: >> :s/\d\+/\=submatch(0) + 1/ >> This finds the first number in the line and adds one to it. >> >> Needing

Re: Regex arithmetic

2017-08-05 Thread porphyry5
On Friday, August 4, 2017 at 10:03:16 AM UTC-7, porphyry5 wrote: > :h submatch( includes >         Example: >             :s/\d\+/\=submatch(0) + 1/ >         This finds the first number in the line and adds one to it. > > Needing to increment several fields consisting of underscore and a single

Re: Regex arithmetic

2017-08-04 Thread Nikolay Aleksandrovich Pavlov
2017-08-04 20:03 GMT+03:00 Graham Lawrence : > :h submatch( includes > Example: > :s/\d\+/\=submatch(0) + 1/ > This finds the first number in the line and adds one to it. > > Needing to increment several fields consisting of underscore and a single >

Regex arithmetic

2017-08-04 Thread Graham Lawrence
:h submatch( includes Example: :s/\d\+/\=submatch(0) + 1/ This finds the first number in the line and adds one to it. Needing to increment several fields consisting of underscore and a single digit (_\d) I modified the above along the lines of