in reply to Re: Deleting everything before a string
in thread Deleting everything before a string

I would prefer
@content = ($content =~ /\+_(.*?)\+_/sg);
since it would work for more that occurance of the replacement string in the file.

/\/\averick

Replies are listed 'Best First'.
Re: Re: Re: Deleting everything before a string
by I0 (Priest) on Dec 21, 2000 at 19:19 UTC
    Although it is unclear to me how Anonymous Monk would want to handle in that case. Perhaps Anonymous Monk would prefer @content = ($content =~ /\+_(.*?)(?=\+_)/)sg); or /\+_(.*)\+_/s