multi-line regular expression help



Hello,

I am having a problem trying to match both of the following strings:

03/23 THU 07:09A (b12:00P b12:30P) 04:30P 8:00 0:00 0:00

as well as (embedded newline):

03/27 MON 07:59A [ 11:59A 12:44P] (b12:45P
b01:15P) 04:30P 8:00 0:00 0:00

The first string always matches, but the second never matches. I've tried different incarnations of the following regex with no success:

(/^\s*\d\d\/\d\d\s+[A-Z][A-Z][A-Z]\s+.*\d\:\d\d\s+\d\:\d\d\s*$/ms)
^^

I was hoping that the above part (.*) would match a newline or anything else in this case and return it in $&.

Any help appreciated.

Thanks
.



Relevant Pages

  • Re: multi-line regular expression help
    ... As my data is on multiple lines and I was only reading in 1 line at a time, I could never match the regex over multiple lines. ... The first string always matches, ... I was hoping that the above part would match a newline or anything else in this case and return it in $&. ...
    (comp.lang.perl.misc)
  • Re: Standard C Library regex performance issue
    ... except for the number of characters you have to type in. ... To specify more than one option, "or" them together with the | operator: ... By default, Python's regex engine only considers the letters A through Z, the ... The above implies that Pyhton's newline mode is *ON* by default. ...
    (comp.lang.c)
  • Re: /s, /g and /m modifiers
    ... > How come regex is searching beyond newline. ... If you remove the /g modifier, ... wildcard to match any character ...
    (perl.beginners)
  • Re: [regex] How to check for non-space character?
    ... The following regex doesn't seem to work: ... Does it match zero addresses, all addresses, many addresses ... character except newline) Do you have any newlines in your addresses? ...
    (comp.lang.python)
  • Re: /s, /g and /m modifiers
    ... How come regex is searching beyond newline. ... If you remove the /g modifier, ... wildcard to match any character ...
    (perl.beginners)