Thanks to everyone for your help.

Below are examples of the output requested. I'm refraining from giving entire list search returns 4375 entries, which is the expected amount, all are being seen as invalid due to some error in my code. I've tried chomp on the returned data, but no change in results, chop just removed last char and invalidated the results.

Found Invalid Cube Number: A1.01A Found Invalid Cube Number: A1.01B Found Invalid Cube Number: A1.01B ... Found Invalid Cube Number: A2.06AA Found Invalid Cube Number: A2.06AABB Found Invalid Cube Number: A2.06B ... Found Invalid Cube Number: H2.25 Found Invalid Cube Number: H3.10 Found Invalid Cube Number: Imaging Center Found Invalid Cube Number: Italy Found Invalid Cube Number: K1.03A Found Invalid Cube Number: K1.03B ... Found Invalid Cube Number: R1.19G Found Invalid Cube Number: R2.25AA Found Invalid Cube Number: R2.25AABB Found Invalid Cube Number: R2.25BB Found Invalid Cube Number: R2.25D Found Invalid Cube Number: R2.25DD Found Invalid Cube Number: R2.25F Found Invalid Cube Number: R2.25FF ... Found Invalid Cube Number: V3.26P Found Invalid Cube Number: V3.26Q Found Invalid Cube Number: V3.26QR Found Invalid Cube Number: V3.26R Found Invalid Cube Number: V3.26R Found Invalid Cube Number: V3.26S Found Invalid Cube Number: V3.26ST Found Invalid Cube Number: V3.26T

In the results above, all should be a valid Seat Location (pattern) except for 'Imaging Center' & 'Italy'.

FWIW- below is the actual search performed using Net::LDAP. This format has been used in many other scripts besides this one, but thought it may give context to what's happening.

my $userFilter = "(SeatLocation=*)"; my &userAttributes = [ 'SeatLocation', 'uid' ]; my $searchMesg = $ldap->search (base => $userBase, filter => $userFilt +er, scope => $scope, attrs => $userAttributes); my @entries = $searchMesg->entries; my $totalFound=@entries; # determine the number of entries found

Thanks again!


In reply to Re: Perl will not match my RegEx pattern.... by FierceMoose
in thread Perl will not match my RegEx pattern.... by FierceMoose

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.