in reply to pattern matching once
Do you have a specification of the format of these files?
Be aware that using a regex is strongly frowned upon for parsing HTML and XML, as mentioned at:
Though Marshall has already provided you with a regex solution, note that if you only want to match .htm (and not .htmfred say) his regex:
should read:m/<FILENAME>(.*\.htm)/
using the \b regex assertion to match only on a word boundary (see perlre for more detail).m/<FILENAME>(.*\.htm)\b/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pattern matching once
by justin423 (Scribe) on Aug 11, 2023 at 13:33 UTC | |
by eyepopslikeamosquito (Archbishop) on Aug 11, 2023 at 14:24 UTC | |
| |
by Marshall (Canon) on Aug 11, 2023 at 16:50 UTC | |
by justin423 (Scribe) on Aug 11, 2023 at 16:58 UTC | |
by Marshall (Canon) on Aug 11, 2023 at 19:45 UTC | |
by justin423 (Scribe) on Aug 12, 2023 at 03:08 UTC | |
|