in reply to Re^4: pattern matching once
in thread pattern matching once
\b means approximately "word boundary". Any white space character (space or \n or other such character like \t) satisfies that boundary condition. End of the string also satisfies that boundary condition (i.e. having no character following ".htm").
What do you mean by " so the /b didn't work all the time"?
Look carefully and make sure that there is no space before the \b in:
if (my ($doc_title) = $line=~ m/<FILENAME>(.*\.htm)\b/) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: pattern matching once
by justin423 (Scribe) on Aug 12, 2023 at 03:08 UTC | |
by Marshall (Canon) on Aug 12, 2023 at 07:23 UTC |