Regex Guru

Tuesday, 16 February 2010

Regular Expressions Cookbook Is in The Money—Win a Copy

Filed under: Regex Cookbook — Jan Goyvaerts @ 15:17

You may have heard some people say that most book authors never get any royalties. That’s not true because most authors get an advance royalty that is paid before the book is published. That’s the author’s main incentive for writing the book, at least as far as money is concerned. (If money is your main concern, don’t write books.)

What is true is that most authors never see any money beyond the advance royalty. Royalty rates are very low. A 10% royalty of the publisher’s price is considered normal. The publisher’s price is usually 45% of the retail price. So if you pay full price in a bookstore, the author gets 4.5% of your money. If there’s more than one author, they split the royalty. It doesn’t take a math degree to figure out that a book needs to sell quite a few copies for the royalty to add up to a meaningful amount of money.

But Steven and I must have done something right. Regular Expressions Cookbook is in the money. My royalty statement for the 3rd quartier of 2009, which is the 2nd quarter that the book was on the market, came with a check. I actually received it last month but didn’t get around to blogging about. The amount of the check is insignificant. The point is that the balance is no longer negative. I’m taking this opportunity to pat myself and my co-author on the back.

To celebrate the occassion O’Reilly has offered to sponsor a give-away of five (5) copies of Regular Expressions Cookbook. These are the rules of the game:

  1. You must post a comment to this blog article including your actual name and actual email address. Names are published, email addresses are not.
  2. Comments are moderated by myself (Jan Goyvaerts). If I consider a comment to be offensive or spam it will not be published and not be eligible for any prize.
  3. If you don’t know what to say in the comment, just wish me a happy 100000nd birthday, so I don’t have to feel so bad about entering the 6-bit era.
  4. Each person commenting has only one chance to win, regardless of the number of comments posted.
  5. O’Reilly will be provided with the names and email addresses of the winners (and those email addresses only) in order to arrange delivery.
  6. Each winner can choose to receive a printed copy or ebook (DRM-free PDF). If you choose the printed book, O’Reilly pays for shipping to anywhere in the world but not for any duties or taxes your country may impose on books imported from the USA. If you choose the ebook, you’ll need to create an O’Reilly account that is then granted access to the PDF download. You can make your choice after you’ve won, so it doesn’t influence your chance of winning.
  7. Contest ends 28 February 2010, GMT+7 (Thai time).

Chosen by five calls to Random(78)+1 in Delphi 2010, the winners are:

  • 48: Xiaozu
  • 45: David Chisholm
  • 19: Miquel Burns
  • 33: Aaron Rice
  • 17: David Laing

Thanks to everybody who participated. The winners have been notified by email on how to collect their prize.

Saturday, 13 February 2010

Регулярные выражения Сборник рецептов

Filed under: Regex Cookbook — Jan Goyvaerts @ 15:41

When the Fedex guy dropped off a copy of “Регулярные выражения Сборник рецептов” last week I thought there must have been some mistake. I don’t read any language that uses the Cyrillic script. Then I noticed the musk shrew on the cover. Turns out the book is the Russian translation of Regular Expressions Cookbook. It’s in hardback and the cover is maroon rather than magenta. Judging from the numbering in the table of contents, the book was translated entirely.

I don’t know anything about Russian bookstores. The very first page of “Регулярные выражения Сборник рецептов” is an advertisement for books.ru. Typing in the book’s ISBN on that site leads me to a page where you can apparently buy Регулярные выражения Сборник рецептов.

Reguläre Ausdrücke Kochbuch

Filed under: Regex Cookbook — Jan Goyvaerts @ 15:24

O’Reilly Germany just sent me my author copy of Reguläre Ausdrücke Kochbuch, the German translation of Regular Expressions Cookbook. The German edition is in hardback and the cover is light blue instead of magenta. The content of the book is the same, except translated in German.

You can buy Reguläre Ausdrücke Kochbuch from Amazon.de and get free delivery to Germany, Austria, Switzerland, Luxembourg, Liechtenstein, Belgium, and The Netherlands. You can also buy Reguläre Ausdrücke Kochbuch from Amazon.fr or buy Reguläre Ausdrücke Kochbuch from Amazon.co.uk. If you use one of the links in this blog to buy the book, Amazon pays me an affiliate commission that will actually exceed the royalty that O’Reilly pays, at no extra cost to you. Or you can support your local bookstore and buy Reguläre Ausdrücke Kochbuch wherever German language technical books are sold.

Friday, 6 November 2009

TPerlRegEx.CleanUp() Bugfix

Filed under: Regex Trouble — Jan Goyvaerts @ 16:28

Recent versions of TPerlRegEx were missing these two lines in the CleanUp() method after the call to pcre_dispose():

pattern := nil;
hints := nil;

Failing to set the pointers to nil caused TPerlRegEx to attempt to free them multiple times when reusing a TPerlRegEx instance with another regular expression. The latest version fixes this.

Download TPerlRegEx. Source is included under the MPL 1.1 license.

Next Page »