To match any character except specified character (in this example "f") I use [^f]+
.
But how to match any character except specified word? Something like [^word]+
Example:
haystack: "bla1 bla2 bla3 bla4 hello bla5 bla6 bla7"
(haystack contains HTML and newlines)
needle: "bla1 bla2 bla3 bla4 "
So I want to catch everything from start untill "hello"
No comments:
Post a Comment