I'm working on a spreadsheet of movies and I need to find all instances where a cell in a specific column is of the form "*, The (year)" and replace it with "The, * (year)". For example, a cell with the text "Sound of Music, The (1965)" should become "The Sound of Music (1965)", and the same for the rest of the entries in the column with the same problem.
CodePudding user response:
regular expression (.*), (The )(\(\d \))
replacement $2$1$3
match your input into regex groups enclosed in parentheses. Escape literal parentheses with backslash. replace by referring the matched group with $ sign and index.