Friends,
Im testing AFR and want to do the following... In this text file (FTP program Serv-U ini file), I wanna find the users who dont have Timeout= and MaxNrUsers=2 defined.
I tried something lke RelPaths=1\n[
But it didnt work. The goal is to find user X below, since after Relpaths=1, theres [USER... And that doesnt exist for the ones that have Timeout and MaxNrusers which come after Relpaths.
See:
[USER=joe|1]
HomeDir=c:\y
Password=sadsadsa
Access1=c:\y|RWAMLCDP
RelPaths=1
TimeOut=3600
MaxNrUsers=2
[USER=x]
HomeDir=c:\x
Password=xyz
Access1=c:\x|RWAMLCDP
RelPaths=1
[USER=maria|1]
HomeDir=c:\y
Password=sadsadsa
Access1=c:\y|RWAMLCDP
RelPaths=1
TimeOut=3600
MaxNrUsers=2
How can I accomplish this?
Thanks a lot,
Marcio
Multiline find - how do I accomplish this?
-
- Posts: 4
- Joined: Sun Mar 12, 2006 3:45 pm
-
- Posts: 4
- Joined: Sun Mar 12, 2006 3:45 pm
-
- Posts: 4
- Joined: Sun Mar 12, 2006 3:45 pm
-
- Posts: 4
- Joined: Sun Mar 12, 2006 3:45 pm
Roman,
Maybe I wasnt clear.
In the case below, I wanna find all the ones that after RELPATHS have a CR and [USER or something like that.
The goal is to find the ones that dont have timeout= and maxnrusers=
Thanks a lot!
[USER=joe|1]
HomeDir=c:\y
Password=sadsadsa
Access1=c:\y|RWAMLCDP
RelPaths=1
TimeOut=3600
MaxNrUsers=2
[USER=x]
HomeDir=c:\x
Password=xyz
Access1=c:\x|RWAMLCDP
RelPaths=1
[USER=maria|1]
HomeDir=c:\y
Password=sadsadsa
Access1=c:\y|RWAMLCDP
RelPaths=1
TimeOut=3600
MaxNrUsers=2
Maybe I wasnt clear.
In the case below, I wanna find all the ones that after RELPATHS have a CR and [USER or something like that.
The goal is to find the ones that dont have timeout= and maxnrusers=
Thanks a lot!
[USER=joe|1]
HomeDir=c:\y
Password=sadsadsa
Access1=c:\y|RWAMLCDP
RelPaths=1
TimeOut=3600
MaxNrUsers=2
[USER=x]
HomeDir=c:\x
Password=xyz
Access1=c:\x|RWAMLCDP
RelPaths=1
[USER=maria|1]
HomeDir=c:\y
Password=sadsadsa
Access1=c:\y|RWAMLCDP
RelPaths=1
TimeOut=3600
MaxNrUsers=2
The problem is the following:
AFR uses standard (classical) regular expressions. According to these
expressions you may create expressions that match to given text.
But you cannot create expressions that does not include the text.
So you may easily create expression which finds all users having
timeout= and maxnrusers= text. But it's impossible to find users not
having timeout= and maxnrusers= text.
What we are thinking about: maybe we may extent standard regular
expressions by adding the command to find text not having given
substring.
We recorded it into our ToDo list. We will send you email when it will
be ready.
AFR uses standard (classical) regular expressions. According to these
expressions you may create expressions that match to given text.
But you cannot create expressions that does not include the text.
So you may easily create expression which finds all users having
timeout= and maxnrusers= text. But it's impossible to find users not
having timeout= and maxnrusers= text.
What we are thinking about: maybe we may extent standard regular
expressions by adding the command to find text not having given
substring.
We recorded it into our ToDo list. We will send you email when it will
be ready.
Well... we found how can we do that!
I said it's impossible to find text not having substrings.
But what we can do: take your INI file and remove from the users
having
Timeout= and MaxNrUsers=
what will be left in the INI file? Users not having Timeout= and
MaxNrUsers= !
So you may use the software already now.
Step by step instructions.
When you need to find users not having Timeout= and MaxNrUsers=
take
your INI file and put it (copy) into temp folder. For example,
C:\Program Files\Advanced Find and Replace\test
Start AFR.
Put the following two lines into Batch grid:
search for:
USER=.*\].*Timeout=\d+.*\r\n\[
replace with:
(empty)
USER=.*\].*MaxNrUsers=\d+.*\r\n\[
replace with:
(empty)
Modifier S should be ON in Options window (as described in the message above).
Select correct Search Path (your temp folder).
Press Execute button.
That's all.
Let us know if you have any other questions.
I said it's impossible to find text not having substrings.
But what we can do: take your INI file and remove from the users
having
Timeout= and MaxNrUsers=
what will be left in the INI file? Users not having Timeout= and
MaxNrUsers= !
So you may use the software already now.
Step by step instructions.
When you need to find users not having Timeout= and MaxNrUsers=
take
your INI file and put it (copy) into temp folder. For example,
C:\Program Files\Advanced Find and Replace\test
Start AFR.
Put the following two lines into Batch grid:
search for:
USER=.*\].*Timeout=\d+.*\r\n\[
replace with:
(empty)
USER=.*\].*MaxNrUsers=\d+.*\r\n\[
replace with:
(empty)
Modifier S should be ON in Options window (as described in the message above).
Select correct Search Path (your temp folder).
Press Execute button.
That's all.
Let us know if you have any other questions.