You may, however, wish to treat a string as a multi-line buffer, such that the "^" will match after any newline within the string, and "$" will match before any newline. At the cost of a little more overhead, you can do this by using the /m modifier on the pattern match operator
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
I should just point out that a negative lookbehind has to be a fixed string.... technically it's called fixed-width, so I'm not sure... perhaps the use of the "alternative" operator is permitted.
scottayy wrote:You may, however, wish to treat a string as a multi-line buffer, such that the "^" will match after any newline within the string, and "$" will match before any newline. At the cost of a little more overhead, you can do this by using the /m modifier on the pattern match operator
I'm interested in replacing the line breaks, so it's important to me that the preg_replace consume the \n, hence my decision to not use /m. I do use /m in the expression immediately preceeding the one I'm having trouble with: