I would like to match any character and any whitespace except comma with regex. Only matching any character except comma gives me:
[^,]*
but I also want to match any whitespace characters, tabs, space, newline, etc. anywhere in the string.
EDIT:
This is using sed in vim via :%s/foo/bar/gc.
I want to find starting from func up until the comma, in the following example:
func("bla bla bla"
"asdfasdfasdfasdfasdfasdf"
"asdfasdfasdf", "more strings")
I
To work with
multilineinSEDusingRegEx, you should look at here.EDIT:
In
SEDcommand, working with NewLine is a bit different.SEDcommand support three patterns to manage multiline operationsN,PandD. To see how it works see this(Working with Multiple Lines) explaination. Here these three operations discussed.My guess is that
Noperator is the area of consideration that is missing from here. Addition ofNoperator will allows to sense\nin string.An example from here: