ted_chou12 Posted November 17, 2008 Share Posted November 17, 2008 This (.*?) does not match with newline but I wish to also include the new line in the matched string: <start>this string contains a newline<end> What should I replace (.*?) with? Thanks, Ted. Quote Link to comment https://forums.phpfreaks.com/topic/133082-solved-match-with-new-line-in-the-matched-string/ Share on other sites More sharing options...
ddrudik Posted November 17, 2008 Share Posted November 17, 2008 the s modifier is used for this: http://us3.php.net/manual/en/reference.pcre.pattern.modifiers.php Quote Link to comment https://forums.phpfreaks.com/topic/133082-solved-match-with-new-line-in-the-matched-string/#findComment-692093 Share on other sites More sharing options...
ted_chou12 Posted November 17, 2008 Author Share Posted November 17, 2008 thanksĀ Quote Link to comment https://forums.phpfreaks.com/topic/133082-solved-match-with-new-line-in-the-matched-string/#findComment-692099 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.