RegEx advice needed

\\w is looking like what I want, but \\w+ is really what I want. In fact, \\w+ does not works and returns only the first found word.
Worst: it returns numbers if there are some. So, no, \\w is not what I want. But do not found what I want, thus this help call.

Imagine a sentence like:

Hoot 001 [2015-01-10] (Fernand).zip

With my current code, it is absolutely correct: it sends each atom * in the correct Column of a ListBox.

BUT: if the line is:

It’s a Hoot ! [2015-01-10] (Fernand).zip

I only get it (the remainding is correct).

What can I use as Search parttern ?

Explanation for the above:

To get the issue number (in that case it is displayed as 3 digits, but can it be - elsewhere - 2 digits or eventually 4 digits: + is here for that), I use:
there is a leading space, I want all digits and there is an ending space.

For the date:
\d±\d±\d+ (I think, not sure. I used: \d\d\d\d-\d\d-\d\d to be sure to get the date as ISO 8601, a.k.a. SQLDate).

For the alias (alternate name, between parents), I used Kem advice (thanks a lot pal)

And for the file extension, I use NthField (I was running traditional on that one).

At last, I know that the file names I will work with will not always be as intelligent as this one. Data comes from the web and some use strange date (for example using a dot instead of a -).

  • Each atom:
    Hoot File Name
    001 Issue Name
    [2015-01-10] Released date
    (Fernand) Scan person alias
    .zip File extension

BTW: It’s a Hoot ! is a U.K. Comic Book name.

Is your regex greedy or not? If not turn it on. You may need to make your regex more specific than looking for words.

Also, there is no issue number in the second example. Was that a typo, or might that be the case sometimes?

A typo (not even a copy/paste as it sometimes happen).

Not yet. I will try.

Thanks for the inputs.

Try this:

(.+) (\\d+) \\[([^]]+)\\] \\(([^)]+)\\)\\.(.*)

SubExpressionString( 1 ) = Title
SubExpressionString( 2 ) = Issue Number
SubExpressionString( 3 ) = Date
SubExpressionString( 4 ) = Scanner
SubExpressionString( 5 ) = File Extension


After the usual checkings: THANKS YOU Kem !

Works fine on my testing file (that represent a real set of archive files.

if you have a regex question, well Kem is THE Man to ask …
Kem I bought your regexrx software even if I don’t use it a lot find it soooo usefull if I eventually need it !