Abacre.com

General discussions about products.
It is currently Fri Sep 03, 2010 5:44 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: using afr to increment values
PostPosted: Wed Mar 30, 2005 8:46 am 
Offline

Joined: Wed Mar 30, 2005 8:37 am
Posts: 2
Hi, I just found your product and so far in my testing is does everything that i'd like it to, except for one thing. I'm currently working with some dns zone files which have a format of

@ IN SOA dns-1.example.com. webadmin.example.com. (
18 ; Serial number
900 ; Refresh
600 ; Retry
86400 ; Expire
3600 ) ; Minimum TTL
NS dns-1.example.com.
NS dns-2.example.com.
A nnn.nnn.nnn.nnn
MX 10 mail
mail A nn.nn.nnn.n
www A nnn.nnn.nnn.nnn

What i'm having a hard time wraping my head around is how to take the "Serial Number" (in this case 18, but could be different for each file) and increment it's value by 1. (ie 18 -> 19). Is there a way that AFR can do this or am I back to writing code? If it does than you just got yourselves another customer!!!

Thanks in advance,
benhab


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 1:41 pm 
Offline
Site Admin

Joined: Mon Jan 31, 2005 5:32 pm
Posts: 945
Hi,

It's not possible to do now with AFR, but I know how to quickly
implement it (we already have a pretty framework for it). We will develop it this week. I will send you a message
then.

_________________
Kind regards,
Roman Vasin
Abacre Limited
http://www.abacre.com
support@abacre.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 04, 2005 5:31 pm 
Offline
Site Admin

Joined: Mon Jan 31, 2005 5:32 pm
Posts: 945
Hi,

Ok, we implemented the feature.

Please download the latest version of the program:
http://www.abacre.com/download/afrexe.zip

This is only updated EXE file. You need to extract executable file from
zip archive into folder where the program is installed. So you will
replace old executable file by this new one.

Start the program. In main menu Action - Options - Batch replace:
check ON modifier E (which means evaluate text in <>).

Then go to Batch replace tab of the main window
and put into
Search for:
(\w+) ; Serial number

Replace with:
<$1+1>; Serial number

That's all. I verified and it perfectly works.

Note that if you are sure that the line starts with serial number then
you may use ^ before the regular expression. ^ means start of the
line. So in this case you should put ^(\w+) ; Serial number into
Search for field.

Tell me does it work now?

_________________
Kind regards,
Roman Vasin
Abacre Limited
http://www.abacre.com
support@abacre.com


Top
 Profile  
 
 Post subject: awesome!!! couple of tweeks works great!
PostPosted: Tue Apr 05, 2005 7:07 am 
Offline

Joined: Wed Mar 30, 2005 8:37 am
Posts: 2
Thank Roman so very much, can't tell you how much time this saved me. We'll definetly be purchasing the product. And heartily recommending it to all who ask.

FYI... I used the follow regexs to get it to work.

Search For:
(.*\d*.*);.*Serial number

Replace with:
<$1+1>; Serial number\r\n

Thanks again,
Ben Habing
Infrastructure Architect
Genesys Networks Inc.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 1:26 pm 
Offline
Site Admin

Joined: Mon Jan 31, 2005 5:32 pm
Posts: 945
BTW, just a quick note: in official version of the program we will use
<%= =%>
for evaluating the expressions instead of < > described here.

_________________
Kind regards,
Roman Vasin
Abacre Limited
http://www.abacre.com
support@abacre.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group