#1 : 09/05-23 21:17 Leandro
Posts: 2
|
Hey guys, i'm having a hard time with regular expressions, I didnt had to use them before and now my new system create files with diffrent names like this:
3_042023_DISTRIBUIDORA_Espelho e resumo da folha 5_042023_COISA DIFERENTE LTDA_Espelho e resumo da folha 10_042023_ALGUMA COISA LTDA_Espelho e resumo da folha 12_042023_ALEMAO CONGELADOS LTDA_Espelho e resumo da folha I need to turn them into this: 0003 - RESUMO - 2023 04 - 00 0005 - RESUMO - 2023 04 - 00 0010 - RESUMO - 2023 04 - 00 0012 - RESUMO - 2023 04 - 00 Can anyone help? Thanks! |
#2 : 09/05-23 23:36 David Lee
Posts: 1125
|
Replace: _(\d{2})(\d{4}).*
with: - RESUMO - \2 \1 - 00 Use regular expressions Then add a Renumber method to fix the zero padding of the first number... Number position: 1 Change to: Relative to existing number Number difference: 0 Zero padding: Manual Number length: 4 |
#3 : 10/05-23 13:49 Leandro
Posts: 2
|
Wow, thank you so much!
|