View Single Post
Old 10-23-2020, 09:34 PM   #1
GlennMaples
Member
GlennMaples began at the beginning.
 
Posts: 17
Karma: 10
Join Date: May 2010
Device: none
Regex Issues (v4.23)

I'm on 4.23 -- waiting a bit to go to 5.X. But hoping someone would help me with a sanity check on my regex?

I have files where the series are displaying with extra brackets. Displayed in stock series column as:

[My Little Pony 01] [01]
[My Little Pony 02] [01]
[My Little Pony 03] [01]

My regex-->

Search field: Series
Destination field: Series_Index
Search For: (\d{2})
Replace: \1

This is about as simple it could be (infamous last words) and works in the regex101 online engine. But in 4.23 this is returning the entire Series (e.g.,
[My Little Pony 01] instead of the desired number: 02. I have never done regex in python and am hanging my head very low in my abject shame. thanks for your time. :-)

-glenn
GlennMaples is offline   Reply With Quote