|
|
#1 |
|
Zealot
![]() Posts: 145
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 01:19 PM. |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,664
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Zealot
![]() Posts: 145
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 02:15 PM. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extend work the regular expression to filename | r2d256 | Editor | 22 | 12-26-2015 12:40 PM |
| Need help with a regex expression | MrMcGyver | Library Management | 3 | 03-11-2015 05:00 PM |
| Regular Expression - Adding metadata from filename | LMF | Calibre | 1 | 03-20-2012 07:46 PM |
| Help for expression to extract metadata from filename | nickflyger | Library Management | 1 | 11-13-2011 11:39 AM |
| What is the default regular expression for filename import? | palex481 | Calibre | 2 | 03-22-2009 07:11 PM |