In a file, I have strings like this: abeir7pf4tz
All start with 'abei', then followed by 7 random characters.
Examples are:
abeiy7pcfh6
abeih7pkj7p
abeiv7pdl5v
abeia7prr87
abeiy7pjkdg
It looks like the 6th character is a 7 - but not sure if this will always be the case.
What I want to do is delete all occurrences of 11 character strings that start with abei.
I want to read the file contents, delete all occurrences and then replace the file and overwrite with the new content.
What's the best way of doing this?
Thanks.
Need help with stringreplace or regex
Re: Need help with stringreplace or regex
Read the file to a variable, delete the strings and the file, and then FileAppend to a new file.
You can use a Regex like the following.
\babei\w{7}
You can use a Regex like the following.
\babei\w{7}
Re: Need help with stringreplace or regex
You are amazing
I'll try that and let you know if I have problems
I'll try that and let you know if I have problems
Who is online
Users browsing this forum: dunnerca and 213 guests