![]() |
#1 |
Connoisseur
![]() Posts: 54
Karma: 10
Join Date: Dec 2015
Device: kpw2
|
Splitting multiple author names - RegEx little modification?
Hello
So the basic RegEx is: Code:
authors_split_regex = '(?i),?\\s+(and|with)\\s+' How for such case the RegEx could look like? |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() Posts: 54
Karma: 10
Join Date: Dec 2015
Device: kpw2
|
Bump
![]() |
![]() |
![]() |
![]() |
#3 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Bumping is frowned upon.
Necro-bumping is really frowned upon ![]() |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,073
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Waiting over two years for a response before bumping shows an incredible level of patience.
![]() |
![]() |
![]() |
![]() |
#5 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Or font332 was hibernating, as most of us have been forced/coerced into doing recently. Hopefully a regex guru (which I'm not) will give font332 an answer to the question he/she posted in 2017. ![]() ![]() BR |
|
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
With the emoticon, I can't decide if @font332 is being serious or not. But...
My first thought was simply: Code:
(?i),?\\s+(and|with|;)\\s+ I think the following works: Code:
(?i),?(\\s*;\\s*|\\s+(?:and|with)\\s+) |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() Posts: 54
Karma: 10
Join Date: Dec 2015
Device: kpw2
|
Thanks everyone for the interest.
In fact I think I've probably solved my problem at that time, but then I lost my library and forgot the formula and regex also. It's been already few times in my life re-learning the regex, but we have to know when to say stop. That's partly why I bumped this dusty topic. Thank you @davidfor for the formula, it probably doesn't work tho. I say probably because the way how I checked this is that normally when we are typing the authors in author field and we type "&" symbol, calibre will start to give a list of suggestion for another author. This doesn't happen for ";" symbol. I think anyway I will not make life more complicated then necessary and I will give up this idea and just convert and use for the future the "&" symbol. |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() Posts: 54
Karma: 10
Join Date: Dec 2015
Device: kpw2
|
Thanks for clarification
![]() |
![]() |
![]() |
![]() |
Tags |
calibre, regex, regular expression |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bulk changing author names to author sort in tag browser | AussieTupp | Library Management | 6 | 02-05-2017 04:22 AM |
Regex to find author names all in uppercase? | Vortex | Library Management | 3 | 08-03-2016 06:50 PM |
Splitting multiple html files? | nqk | Editor | 5 | 11-27-2015 02:08 AM |
Splitting of multiple authors | Jellby | Calibre | 1 | 04-01-2013 11:34 AM |
Splitting the Bible into Multiple Files | SciFiGal777 | Ectaco jetBook | 3 | 03-27-2010 09:35 PM |