Posts Tagged ‘Russell Phillips’

Today I have the honour of hosting another guest post from indie author Russell Phillips. Russell combines an insider’s knowledge of the challenges of indie publishing with a computer programmer’s awareness of how to get the most out of the tools available to us, and this post brings those things together to offer a technological solution to many of your editing needs.

Over to you Russell…

Using Regular Expressions To Find Common Errors

I have a great editor, but I understand that she is human, and therefore she makes mistakes, and misses things, just like I do. Therefore, I like to try and make my manuscript as good as I can before I hand it over to her. The trouble with editing your own work, of course, is that all too often, your brain sees what is supposed to be there, not what is actually there.


One tool I use for finding errors is regular expressions. Regular expressions are like search and replace on steroids. Instead of finding simple strings of text, regular expressions provide a way to find patterns within the text. This makes them ideal for finding certain types of error that can occur all too easily when writing a long piece of text. The use of copy & paste, deleting, etc, can mean that even simple grammatical mistakes or typos can slip in and not be noticed.

Below I have listed some regular expression searches that I currently use on my manuscripts before sending them to my editor. To use one of them, simply copy it into the “Find” box in your word processor, just as you would type in a word you wanted to search for in the text. Note that they are formatted with a different background colour because spaces at the start or end can be important. It is possible to use regular expressions to replace text, but I haven’t included replacement expressions because I prefer to be cautious and make corrections manually. I’ve tried to order them in increasing complexity, and I’ve included some explanatory text for each one.

The expressions given below should work in LibreOffice and Scrivener version 2.4 or later (earlier versions don’t support regular expressions). Microsoft Word also supports regular expressions, although the syntax is rather unusual, so you’ll need to check the documentation for help. Whichever software you use, you will have to tell it that you’re doing a regular expression search, rather than a normal text search. In LibreOffice Writer, use the “Find and Replace” function (not “Find”). Click “Other Options” in the dialogue box, and tick the “Regular expressions” tickbox. In Scrivener project search, select “RegEx” from the operator section of the magnifying glass icon menu. In Scrivener document find, select “Regular Expressions (RegEx)” from the “Find Options” drop-down menu.

Note that, when copying and pasting from your browser into the search box, make sure that the quotation marks are correct – they sometimes get mangled.

Punctuation And Quotation Marks

This is a simple expression, but there are two versions. In British English, the convention is to have commas and full stops outside quotation marks, whereas in US English, commas and full stops are placed inside the quotation marks.

Expression to find commas and full stops inside quotation marks (use this if you write in British English):


Expression to find commas and full stops outside quotation marks (use this if you write in US English):


These simple expressions match a quotation mark followed or preceded by a full stop or a comma. Square brackets are used to group characters, so that if any character in the square brackets is present, a match is found. In this case, the square brackets are used to match a full stop or comma, but nothing else.

“a” instead of “an”

This expression will find words that begin with a vowel immediately preceded by “a”, instead of “an”:

a [aeiou]

The first three characters are simple: space, lower case “a”, space. Then square brackets are used to group all five vowels. Note that the “Match case” option must be selected in LibreOffice for it to work correctly.

Oxford Commas

At school, I was taught not to use Oxford commas, but I use them in my books because they can avoid ambiguity. Unfortunately, because I didn’t use them for so long, I frequently forget to add them. Consequently, one of the first regular expressions I wrote to check for errors in my writing was to spot missing Oxford commas. Note that this won’t find every sentence that is missing an Oxford comma, but that’s why you have a human editor 🙂

\w+, \w+ and 

If you have the opposite problem, and you don’t want Oxford commas, the following expression should find them:

\w+, \w+, and 

“\w” matches a word character, ie any character that can be part of a word (letters, numbers, etc). The “+” means at least one of the preceding characters must be present, so “\w+” matches a word.

Missing Capital After Full Stop

I started using this expression after seeing this error in a book published by HarperCollins. If the big publishers can miss such basic mistakes, so can the rest of us.

Note that the “Match case” option must be selected in LibreOffice for it to work correctly. Acronyms followed by lower case letters, eg “The N.C.O. said” will not be matched.

[^.][^A-Z]\. [a-z]

This expression introduces a new twist on the use of square brackets: if the first character in the square brackets is a “^”, it matches anything NOT in the group. So, “[^.][A-Z]” matches anything that is not a full stop, followed by anything that is not an uppercase letter. The next term is “.”, which matches a full stop. When not in square brackets, a full stop is a wildcard, but placing a backslash before it tells the regular expression engine to treat it as a full stop, not as a wildcard. Finally, it matches a space followed by a lowercase letter.

Missing Brackets

It’s far too easy to forget to close brackets, or to accidentally delete the closing bracket. This expression will find an opening bracket that doesn’t have a matching closing bracket.


Since parentheses have a special meaning in regular expressions, the opening bracket is prefixed with a backslash. This tells the regular expression engine to treat it as a simple opening bracket. The “[^)]” matches any character that is not a closing bracket, and the “*” means “match this zero or more times”. Finally, the “$” indicates the end of the line/paragraph.

Repeated Word

Repeated words crop up sometimes, and often aren’t noticed if the word happens to appear at the end of one line and the start of the next line.

\b(\w+)\b \b\1\b

This one may look rather odd, but is simple once you understand it. As above, “\w+” is used to match a word. The parentheses are used to group the characters that are matched, so that they can be referred to later in the expression. The “\1” matches the group in the parentheses. “\b” denotes a word boundary. In this case, it is used to ensure that only complete words are matched. Without the word boundaries, it would match a term like “anderson song” as the “son” would be matched in both words.

Putting all that together, this expression matches a complete word, followed by at least one space, followed by the same complete word.

Want To Learn More?

If you want to learn to write regular expressions to find the mistakes that you find yourself making, is an excellent learning resource, and has a regular expression tester, which will also explain the elements of the regular expression. Finally, feel free to ask questions in the comments, and I will try to help.


About the blogger

Russell Phillips is an author of books on military history and technology. Born and brought up in a mining village in South Yorkshire, Russell has lived and worked in South Yorkshire, Lincolnshire, Cumbria and Staffordshire. His articles have been published in Miniature Wargames, Wargames Illustrated, and the Society of Twentieth Century WargamersJournal. He has been interviewed for the American edition of The Voice of Russia. He currently lives in Stoke-on-Trent with his wife and two children.


Picture by Joanna Penn via Flickr Creative Commons.

Here’s the second in my series of interviews with book people. This time I’m very pleased to present an interview with Russell Phillips. Russell’s a self-published non-fiction writer who’s been a huge help to me in finding my own way into self-publishing.


Tell us a bit about yourself and your books.

I’m originally from South Yorkshire, though I currently live in Stoke on Trent, and I’ve had an interest in military history for as long as I can remember. I started writing articles for magazines in my early 20s, but never thought about writing a book until a few years ago. Once I’d written that first one, I realised that I wanted to write more.

Why did you pick military history, and in particular modern military history, as a subject to write about?

Initially, I chose the Falklands War. I’ve long thought that a lot of British people think the outcome was never in doubt, and the book gave me a chance to show at least some people that it could easily have gone completely wrong. The title (“A Damn Close-Run Thing“) is a direct quote from the commander of the British land forces, and was chosen to reinforce that point. All my subsequent books have been about modern military history because it’s what I’m interested in, and it seemed to make sense to stay within a similar time period. That said, I have vague plans to write books about other periods (particularly the Napoleonic Wars) at some point. So many ideas, so little time … 🙂

What led you to self-publish your books?

When I started writing A Damn Close-Run Thing, I wasn’t sure if I’d finish it, but I started reading about publishing options. Initially, I was thinking that I’d ask the History In An Hour publishers if they were interested, then look into self-publishing if they weren’t. By the time it was written, self-publishing had become my preferred option. I’m something of a control freak, and so having complete control appeals to me. I’m also a techie, so the technical challenges weren’t a barrier.

What have the biggest challenges been for you as a self-published author?

Initially, marketing was a major challenge, but resources like The Creative Penn and The Sell More Books Show have helped a lot with that. Self-doubt has been a constant challenge, though. I generally try to ignore reviews, because the bad ones bother me more than the good ones please me.

And what have been your biggest triumphs?

I’ve been interviewed by The Voice of Russia, which was a great, but odd, experience. Earlier today, I posted a copy of A Damn Close-Run Thing to the Argentinian Army Central Library. I was amazed that they’d even heard of it, but also very proud that had, and that they wanted a copy.

If you could give one piece of advice to other writers out there, what would it be?

If you want your books to sell, you will have to do some marketing, so look for ways to market that you’re comfortable with.

Last question – what book have you enjoyed recently, and what was so good about it?

The Blue Effect by Harvey Black. It’s the final part of a trilogy, and finished the story nicely. The trilogy is based on a Warsaw Pact invasion of Western Europe in 1984. The author served with the British army during the 1980s, and it shows. Much of the focus on the NATO side is on British forces, which frankly makes a pleasant change, and it’s well researched, which is important to me. If I notice a technical mistake, it drops me out of the story, and if it happens too often, it spoils my enjoyment enough that I stop reading.


* * *

Thank you to Russell for taking the time for the interview. You can find out more about him and his books on his website, which includes some handy tools for self-published authors.

Today I have a guest post from Russell Phillips. Regular readers will be familiar with Russell as the author of several self-published books on military history, as well as many insightful comments here. He’s been a huge help to me in starting with self-publishing, and he’s here to offer some more of that great insight today…


When I was at university, I discovered open source software, and I’ve been using it ever since. For those of you unfamiliar with the term, open source basically means that the source code for a program is available to anyone that wants it. They can then examine it and, if they wish, change it so that it better suits their needs. These days, I’m less involved with the open source community, but I can see some parallels between the open source community and the self-publishing community. I think there are lessons to be learned from the open source community’s experiences.

Fund-raising and self-publishing (the open source way), Part one

I often saw this quote in open source circles: “First they ignore you, then they laugh at you, then they fight you, then you win.” I’d say that open source is currently in the “then they fight you” stage, and self-publishing is moving from “then they laugh at you” to “then they fight you”. I don’t know whether self-publishing will ultimately “win” or not. I think it will become an accepted way to publish, and that in itself is something of a victory. Maybe the traditional publishing houses will slowly die out completely, and self-publishing will be the only way to publish, but it seems more likely that some traditional publishers will adapt and survive, alongside self-publishing.

FUD: Fear, Uncertainty, And Doubt

Many open source advocates have accused traditional, closed-source, companies and developers of using tactics known as “FUD” (Fear, Uncertainty, and Doubt) when arguing against the use of open source software. Such tactics are easy to use, and difficult to counter, since they don’t offer concrete examples of problems, they simply suggest that problems might exist. Why go for the new and unknown, the argument goes, when you can stick with what you know? The same tactics are now being used against self-publishing, with warnings that many self-published books might not be ready for publishing.

Hippies, Teenagers, And Authors

The stereotype of open source developers is long-haired hippies and teenagers living in their parents’ basement. Similarly, the stereotypical self-published author only turned to self-publishing because their work isn’t good enough to get a traditional deal. There is undoubtedly some truth in these stereotypes, but in both cases, the stereotypes fall far short of the full story. Large companies including IBM, Microsoft, Google, and Amazon have released open source software. Self-publishers regularly appear in the New York Times and USA Today best-seller lists.

The Letter Matters More Than The Spirit

One lesson all authors (both traditionally and self published) should take to heart is that the letter of the contract is important. Large companies will obey the letter of the contract, and if they don’t, they can be sued. That’s a difficult proposition, but it’s much more difficult to sue a company for not adhering to the spirit of the contract. If you are signing a contract, make sure that everything that matters to you is written into the contract. Similarly, don’t agree to a contract or a set of terms and conditions if there are provisions missing that are important to you. Several large companies (including Amazon) have released open source code because the licence forced them to do so. In some cases, they did the bare minimum to abide by the licence conditions, annoying some open source advocates because the way it was released meant that developers had to spend many hours getting the code into a more useful form.

Not Everyone That Takes The Freebie Would Have Paid

I run my own web server, using the Linux operating system, Apache web server and MySQL database. These are all open source, and none of them cost anything. There is an option to pay for this software, usually in return for support, but because this option is primarily aimed at businesses, it’s expensive. If the free option wasn’t available, I wouldn’t pay the huge licensing fees. I’d make do without my own web server, and just pay to host my websites for me. Similarly, not every copy of your book that is given away or pirated is a lost sale. If the free copy wasn’t available, some of those people would buy your book, but some of them would simply look elsewhere for their entertainment.

Share The Knowledge

This seems to be a lesson that many self-published authors have already taken to heart. The internet has many blogs (including this one), forums, etc, where authors share their knowledge, what has and hasn’t worked for them, etc. Similarly, open source developers often share ideas and help each other solve problems. While it may seem that other authors are competitors, very few of them actually are. I write non-fiction (specifically, military technology and history). Andy writes fantasy, steampunk and sci-fi. My books simply don’t compete with his. Even if a given reader reads both genres, they’re highly unlikely to refuse to buy a book I wrote about the Football War because they’ve already bought a book by Andy about Victorians going to Mars on steam-powered space ships.

What Else?

These are some lessons that I believe self-published authors can learn from the open source world. There are probably more, but I’m sure there are also lessons that could be learned from other areas. Maybe doctors, taxi drivers, and chefs could teach us something. Do you have any lessons from other areas of your life that are relevant to authors? Act on my final lesson, and share your knowledge in the comments.

Image by opensourceway, from Flickr.

Fellow writer J H Mae recently invited me to take part in IC Publishing‘s writing path blog tour – an opportunity for authors to connect up with each other while talking about their craft. That seemed like an interesting thing to do, so here I am, touring from the comfort of my living room. Thanks for the invite!

Seriously, it’s really comfortable here. I’m sitting in Laura’s big armchair, set up perfectly to face the flat screen TV. For her, this is the Skyrim setup. For me, it’s how I write.

Speaking of which…

1. How do you start your writing projects?

Brainstorming. Whether the project’s a short story or a novel, whether it comes to me in a flash of inspiration or comes after trawling my notebooks for hours looking for the right idea, I go from there to brainstorming. I note down ideas relating to the central concept, looking for inspiration for characters, setting, plot and thematic elements that relate to it. Sometimes ideas connect back in with each other, which is great. Sometimes not so much.

Then I develop the main characters, often using Victoria Lynn Schmidt’s 45 Master Characters, because I find templates helpful. I think about background, motives, desires, conflicts. Based on the conflicts I plan out a plot, usually using Dan Wells’s seven point story structure because, again, I like templates – they remind me to put important things in. Somewhere in all of this I’ll do some research, usually at the brainstorming stage, to give me interesting and authentic details to bring my setting alive. If it’s about an alternate history Baghdad I want the history convincing. If it’s about an alien race then I might want tribe formations to seem anthropologically convincing. A few good details will provide a lot of inspiration and a lot of grounding for a story.

Then it’s time to write.

What passes for my office

What passes for my office

2. How do you continue your writing project?

I’m lucky. Because I work at home as a freelance writer I can mix my schedule up to try to create a balanced life. So writing six hundred words of fiction a day is just part of my routine, to be slotted in wherever it’s convenient between other writing, household chores, a bit of mindfulness and maybe a trip to the gym. Sometimes I do a lot more than 600 words, but having that routine is what keeps me going. If I get stuck I use the Write Or Die word processor to force myself to put words on the page, but these days that’s seldom a problem.

I’m usually thinking about my projects between writing them. Many of my most vivid ideas have sprung to mind while driving over the Pennines to visit family.

And no, getting distracted by plot isn’t why I crashed my car, though it was on that route.

3. How do you finish your project?

For most short stories I get a first draft written pretty quickly, then do one or two editing passes (one with input from a friendly reader) and then send them out into the world. But that’s seldom actually the finish. I have about a 5% acceptance rate, so my average story gets rejected nineteen times before it gets accepted. And a few of those rejections come with useful feedback, which I use for further re-writes. So really, a short story is finished when someone accepts it (or I do the edits they request after acceptance) or when I decide that it’s never going to see the light of day and stick it in my ‘abandoned’ folder.

It’s a big folder.

That means that by the time one story’s done with I’ll have written a dozen more, so I don’t really struggle to let go – I’m writing so many things, I get to endings all the time.

4. Include one challenge or additional tip that our collective communities could help with or benefit from.

The best inspiration comes from other creative fields, different disciplines sparking new ways of thinking. So go take ten photos of different sorts of boundaries, or dance around the room like your character, or watch a video about how computer games are structured and see what you can learn.

Next up…

Now I get to pass the tour on to some other fine writers, who will answer these same questions in a week’s time.

First up is Russell Phillips. Russell is an award-winning author of books about military technology and history. His articles have been published in Miniature Wargames,Wargames Illustrated, and the Society of Twentieth Century Wargamers‘ Journal. He has been interviewed for the American edition of The Voice of Russia. And you can read my previous tribute to the awesomeness of Russell here.

Next is another fantasy author from my neck of the woods. Manchester-based R. A. Smith is an occasional time travelling historian, a keen gamer and a wannabe petrolhead. He counts war gaming armies and several bears amongst his extended family. Authors the Grenshall Manor Chronicles, Oblivion Storm and Primal Storm out now, book 3: WIP 🙂

Last and by no means least comes the blogger whose beard and enthusiasm I most envy. Josh Stanton is crazy about steampunk. When he’s not reading and blogging about it, he’s writing it. He is currently working on a steampunk horror, called Choke City.

Go check out their blogs, and look out for their blog tour posts in a week’s time.

Today I want to take a post out from my busy schedule of pontification and celebrate someone really helpful.

I first got to know Russell Phillips through Durham University Treasure Trap, the live roleplay group I was part of at uni. Like any organisation full of young people who care about what they’re doing, DUTT was a club divided by deep ideological and personal rifts. In our case, these mostly boiled down to whether you thought roleplay was a nice addition to the serious business of drinking, or whether drinking was a nice addition to the serious business of roleplaying.

This stuff matters when you’re twenty.

Russell even has a natty line in hats

Russell even has a natty line in hats

Russell was almost unique in being universally liked. Sure, he didn’t come out on our late-night post-questing nightclub expeditions (I was part of the hard drinking party, proudly known as the Drunken Bums) but he was such a decent bloke that everyone liked him. I never heard a bad word spoken against the man, which was positively unique in a society so full of youth and strong opinions (or ignorance and vitriol, depending on how you feel about young people).

It’s a long time since my student days, and I haven’t seen much of Russell – his was one of many old faces I’d wave to once a year across a field full of orcs (I might not be a student but that doesn’t mean I’ve grown out of my hobbies). And then over the past year we stumbled across each other on social media. I was blogging about writing and publishing, while Russell was self-publishing books about military history. He started leaving interesting comments on my blog, offering useful suggestions and insights, and when I put up a post last week asking for self-publishing advice he sent me all sorts of useful guidance and links.

Russell is a top, top bloke. One of the things I love about the modern world is that you can reconnect with people in that way. And one of the things that I like about self-publishing is that it seems to be full of helpful people like Russell.

If you’re at all interested in military history then please check out Russell’s blog and books, which can be found at:

And thank you Russell for all your help!