Hi,
> I have some text here that I have placed in a string. I want to be able > to extract words between text of my choice. For example in the > string... > > $string = "Hello world In: crud all Your."; > > ($mytext) = $string =~ /In:(.*)Your/; > > The above works fine but how can I tell my regex to stop as soon as it > finds these words. For example if in the string... > > $string = "Hello world In: crud all Your. hello again In: crud aagin > Your at the..."; > > The regex above will go crazy? To find the minimal pattern use: ($mytext) = $string =~ /In:(.*?)Your/; -- cu boris Es ist schöner, eine schöne Gegend zu betrachten als zu betreten. -- Jean Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]