04-04-2020, 12:05 PM | #1 |
Zealot
Posts: 137
Karma: 10
Join Date: Sep 2016
Location: Montréal Québec
Device: Kobo Glo; Kobo Libra
|
Getting and using the filename in a regex expression
I want to use the filename to add an id to an expression but I don't know how and I can't find the answer on the web.
For example: I'm in the file name File001.html I want a function to modify this string: ' ></h1>' to get this string: 'id="File001"></h1>' and do it recursively. Thank you. (I hope I'm in the good forum) Last edited by jiembe; 04-04-2020 at 12:19 PM. |
04-04-2020, 12:20 PM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
04-04-2020, 01:07 PM | #3 |
Zealot
Posts: 137
Karma: 10
Join Date: Sep 2016
Location: Montréal Québec
Device: Kobo Glo; Kobo Libra
|
Thank you.
I should have found it. Now if only I can find to use it. Try and error will do as always ! (later) Stupidly easy. Last edited by jiembe; 04-04-2020 at 01:15 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extend work the regular expression to filename | r2d256 | Editor | 22 | 12-26-2015 11:40 AM |
Need help with a regex expression | MrMcGyver | Library Management | 3 | 03-11-2015 04:00 PM |
Regular Expression - Adding metadata from filename | LMF | Calibre | 1 | 03-20-2012 06:46 PM |
Help for expression to extract metadata from filename | nickflyger | Library Management | 1 | 11-13-2011 10:39 AM |
What is the default regular expression for filename import? | palex481 | Calibre | 2 | 03-22-2009 06:11 PM |