Hi - I'm having a heckuva time getting a regular expression to actually replace a ZIP code in a file. So far, I've only managed to insert the desired ZIP, so now my file is invalid for my parser.
Example:
Starting value: ZipCode|06472
Batch replace: Search For:
ZipCode|/d
Replace With:
ZipCode|77625
Actual Output:
ZipCode|77625|06472
I'm not sure if there's something wrong with the structure of the regular expression or if it's a setting in AFR. Thanks in advance.
Using RE to find and replace any ZIP code - but is inserting
Hi,
As far as I understood
you need to replace ZipCode|anynumber
by ZipCode|77625
right?
Use the following:
Go to main menu - Action - Options - Batch replace
check ON "Modifier G".
In main window of the program:
Go to Batch replace, check on "Use regular expressions".
Search for:
ZipCode\|\d+
Replace with:
ZipCode|77625
That's all.
Explanations:
any number: \d
any numbers: \d+
| is reserved char, so we should escape it by using \|
As far as I understood
you need to replace ZipCode|anynumber
by ZipCode|77625
right?
Use the following:
Go to main menu - Action - Options - Batch replace
check ON "Modifier G".
In main window of the program:
Go to Batch replace, check on "Use regular expressions".
Search for:
ZipCode\|\d+
Replace with:
ZipCode|77625
That's all.
Explanations:
any number: \d
any numbers: \d+
| is reserved char, so we should escape it by using \|