William Baldwin last edited by
So I have a document that will have a number for each member number we will say its 1234567 (always the same base member number)
about 6 rows below that will be a row it will find a identifier like PRM or SEL
I want it to then go back to that member number and add (replace to 123456789) 89 to the member number if is identifies PRM, else if it is SEL then I want it to add (replace to 123456700) 00 to the member number. Ideas?
PeterJones last edited by
There is conditional syntax in regex (both in match and replacement), so it’s not impossible.
But to be helpful, we would need dummy data. Please show us something that would be representative of the actual data (but of course no sensitive info), and preferrably show us both a before and an after set of data.
To include the data in your post, paste it in, highlight it, and use the
</>button on the toolbar:
Keep the data separate, like
here is data
there went my data. whoops.
astrosofista last edited by
This regex could do the job, but lacking of actual data, as @PeterJones noted, may make it fail. Take it as a proof of concept:
1234567 bla bla bla bla bla PRM 1234567 bla bla bla bla bla SEL
Hope this helps.