I have a sample of a text file below with multi lines of data between each records
Record 123
[MULTI LINES OF DATA HERE]
Record 124
Record 125
Record 130
Record 163
Is there anyway to add a number to the record number using marco and/or RE? For example if adding 50, my text file will look like this:
Record 173
[MULTI LINES OF DATA HERE]
Record 174
Record 175
Record 180
Record 213
Thanks
Adding a number
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
No. Regular expressions can't count or add: all they know about is uninterpreted characters. In principle you can do this, but not with a single search-and-replace operation. It would be very tedious and would require many separate and different search-and-replace operations.
This is a job for a script in a suitable language, such as Perl, Python, Ruby, Tcl, ECMAscript or Lua. TextPad doesn't support scripts.
This is a job for a script in a suitable language, such as Perl, Python, Ruby, Tcl, ECMAscript or Lua. TextPad doesn't support scripts.