in reply to Regular Expression Hiccup
Literal strings in regular expressions must match character-for-character. The "-" is just as significant as any other character, it isn't discarded or ignored "just because". A "-" is different from " ", so there's no match.
Perhaps more importantly, what is it you are trying to accomplish? If you already know what you are looking for, verbatim, then there is no reason to search via regex, or even string cmp. Just place your titles in some hash structure, or a database, or whatever. Indices and searches are for looking up records by subfield or substring ie smaller parts of the full record.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regular Expression Hiccup
by Mindsword (Initiate) on May 04, 2015 at 20:21 UTC | |
by AnomalousMonk (Archbishop) on May 04, 2015 at 21:46 UTC | |
by jeffa (Bishop) on May 04, 2015 at 21:17 UTC |