View Single Post
Old 08-27-2014, 02:10 PM   #3278
MiniMouse
Groupie
MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.MiniMouse ought to be getting tired of karma fortunes by now.
 
MiniMouse's Avatar
 
Posts: 197
Karma: 318144
Join Date: Jul 2013
Location: Well, there will always be a big time delay because I'm not living in the US! And there could be some communication difficulties too because I'm not a native speaker!
Device: Sony PRS-T3S
Quote:
Originally Posted by JimmXinu View Post
First, you were told before about using sort_ships:true so you only have one order for each to worry about (although sort_ships only works on '/' separated ships.)

We use regular expressions exactly because they can be used to match many different strings. For example, your previous example can be reduced several ways. Here's one:

Code:
## replace pairings with het or slash as you prefer.
add_to_replace_metadata:
 pairing=>Arthur[/,&]Merlin=>slash
 pairing=>Merlin[/,&]Arthur=>slash
 pairing=>John( Watson)?/Sherlock( Holmes)?=>slash
[/,&] will match any one of '/' ',' or '&'.

( Watson)? groups ' Watson' and the ? indicates it can be present or absent.

Regular expressions are very powerful, but complex. If you want to get the best benefit, you should read up on them a bit. Search for something like:
https://www.google.com/search?q=regu...+for+beginners

You are again very fast and very helpful

And yes, I will try to learn more about regular expressions. I like to understand the stuff I do, if possible.



Mini
MiniMouse is offline