Regex replace year I### with 1###


#1

I have a bunch of wax cylinder recordings and the years listed within multiple fields have I's instead of 1's. So I need a regex to match I###, I#I#, I#II replacing the I's with 1's in all tag fields.

Thanks all for your help!


#2

You don't need regular expressions for that. A normal "Replace" action for YEAR where you replace I by 1 will do.


#3

He has to replace I with 1 in multiple fields, not only the YEAR-Tag.


#4

OK, so much for the theoretical part.
Try
Search string: I(\d+)
Replace string: 1$1
You have to apply that action to every field where you suspect that year format.


#5

thanks that worked for all the I###, but what about I#I#?


#6

It should work also.
I just tried:
$regexp('I12I34',I(\d+),1$1)
Result: "112134"