AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

поиск и замена
Goto page Previous  1, 2, 3 ... 13, 14, 15
 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (Russian)
View previous topic :: View next topic  
Author Message
Infocatcher



Joined: 06 Aug 2007
Posts: 1590

PostPosted: Mon Jul 29, 2013 9:09 pm    Post subject: Reply with quote

А у меня меняет. Вокруг «\[ [^\]]+ \]» не должно быть пробелов.
Back to top
View user's profile Send private message
kadvlad



Joined: 16 Mar 2008
Posts: 26

PostPosted: Thu Jun 19, 2014 5:29 pm    Post subject: Reply with quote

Прошу помощи в автоматизации замены цифр.
Есть построчный текст:
Code:
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786
 ... 772-786

Нужно заменить каждую строку на соотв. порядковый номер в данном диапазоне:
Code:
... 772
... 773
...
... 785
... 786
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5289

PostPosted: Fri Jun 20, 2014 8:53 am    Post subject: Reply with quote

kadvlad
SearchReplace.js

Что: ^(.*?)(\d+)-\d+$
Чем: if (typeof nInit == "undefined" || nInit != parseInt($2)) {nInit=parseInt($2); nCount=0;} return $1 + (nInit + nCount++);
[v] Регулярные выражения
[v] Многострочно
[v] Заменять на функцию
Back to top
View user's profile Send private message Send e-mail
kadvlad



Joined: 16 Mar 2008
Posts: 26

PostPosted: Fri Jun 20, 2014 9:45 am    Post subject: Reply with quote

Instructor
спасибо, работает
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (Russian) All times are GMT
Goto page Previous  1, 2, 3 ... 13, 14, 15
Page 15 of 15

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group