Possible to use regular expressions by upload in bulk edit?
-
Hi!
Is it possible to use regular expressions by uploading a media in the bulk edit to set metadata of it (e.g. title)?
I want upload some PDF files with filenames like jegyzokonyv-201606131600-14_2016.pdf or jegyzokonyv-201809101600-HAR_185_22_2018-20_2018.pdf and set the titles of it based on the filenames to Jegyz?k?nyv 2016.06.13. 16:00, 14/2016 or Jegyz?k?nyv 2018.09.10. 16:00, HAR/185/22/2018, 20/2018.
I have created the following content template for the title field, but when I upload the media the title will be set to the name of the PDF file, also e.g. for jegyzokonyv-201809101600-HAR_185_22_2018-20_2018.pdf to jegyzokonyv-201809101600-HAR_185_22_2018-20_2018.
template:[+name_only,extract( '/jegyzokonyv-(?<year>\\d{4})(?<month>\\d{2})(?<day>\\d{2})(?<hour>\\d{2})(?<minute>\\d{2})(?:-HAR_(?<number11>\\d{3})_(?<number12>[0-9A-Z]{2})_(?<number13>\\d{4}))?-(?<number21>\\d{2})_(?<number22>\\d{4})/' )+](Jegyz?k?nyv [+matches:year+].[+matches:month+].[+matches:day+]. [+matches:hour+]:[+matches:minute+](, HAR/[+matches:number11+]/[+matches:number12+]/[+matches:number13+]), [+matches:number21+]/[+matches:number22+])
I’m doing something wrong or can I don’t use regular expressions in this case?
Thank you!
- The topic ‘Possible to use regular expressions by upload in bulk edit?’ is closed to new replies.