O
Oliver
Dear all
I know, that its probably a little boring for the "pro"s to answer
question about regexp...
....but, bevor I start to cry I'd like to ask for a helping hand.
I have the following regexp:
$message =~ m/(\:59\
.+)?(\n\:\d\d\
)/s ;
I am expecting it to grab everything whats between :59: and :70: into
$2.
Unfortunately it does it greedy that for some examples it does not
the add the first but the last match of :59: and :70:.
What can I do, that it matches the first occurance between :59: and :
70: ?
Regards,
Oliver
Example Data:
a)
:21: Hello World
:23A: 12344523423
:59: I Am a line
I am another line
me too
I could be another but mustn't
:70: ABRV
:71A: kkk
b)
:21: Hello World
:23A: 12344523423
:59: I Am a line
I am another line with a number
:70: ABRV
:71G: kkk
:70: ABRV2
:71H: lll
:70: ABRV3
I know, that its probably a little boring for the "pro"s to answer
question about regexp...
....but, bevor I start to cry I'd like to ask for a helping hand.
I have the following regexp:
$message =~ m/(\:59\
I am expecting it to grab everything whats between :59: and :70: into
$2.
Unfortunately it does it greedy that for some examples it does not
the add the first but the last match of :59: and :70:.
What can I do, that it matches the first occurance between :59: and :
70: ?
Regards,
Oliver
Example Data:
a)
:21: Hello World
:23A: 12344523423
:59: I Am a line
I am another line
me too
I could be another but mustn't
:70: ABRV
:71A: kkk
b)
:21: Hello World
:23A: 12344523423
:59: I Am a line
I am another line with a number
:70: ABRV
:71G: kkk
:70: ABRV2
:71H: lll
:70: ABRV3