Dear Gods
I have the following example of a text log file:
Samanchi JAM 3.5 FW [**REQUIRES USER CONTEXT**]
IM CBAS 4.0 IM-Global [**REQUIRES USER CONTEXT**]
Microsoft Office 2003 BU Configuration (IM-NA-02)
Microsoft Office XP Configuration (IM-01)
IM Rappa for Investment Management
Russell Performance Universes Fonts 2.1 IMG [**REQUIRES USER CONTEXT
+**]
IM CBAS PowerPointAddin 3.8a IM Global [**REQUIRES USER CONTEXT**]
IM CBAS Prod (WinDist) [**REQUIRES USER CONTEXT**]
LineData Services LongView 2000 2.5.5 MSIM-NY
IM CBAS 4.0 IM-Global
IM GSD Prod (WinDist) [**REQUIRES USER CONTEXT**]
Microsoft Office 2003 BU Configuration (IM-NA-01) [**REQUIRES USER C
+ONTEXT**]
Russell Performance Universes Fonts 2.1 IMG
I want to capture every line that finishes off with
[**REQUIRES USER CONTEXT**]. So I wrote this bit of code:
print "$1\n" if $item =~ /(.+)\[\*+REQUIRES USER CONTEXT\*+\]$/;
However, I get no output! The above does make sense to me, but obviously its not correct.
Can you kindly enlighten me please on the reason why I get no output, and how I can remediate it?
Thanks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.