I wish to know why I obtain two different output strings by using gsub and stringi. Does the metacharacter "." not include new lines in stringi? Does stringi read "line by line"?
By the way I did not find any way to perform the "correct" substitution with stringi so I needed to use gsub here.
string <- "is it normal?\n\nhttp://www.20minutes.fr"
> gsub(" .*?http"," http", string)
[1] "is http://www.20minutes.fr"
> stri_replace_all_regex(string, " .*?http"," http")
[1] "is it normal?\n\nhttp://www.20minutes.fr"