Here is an example
function[something][hello()].sub(amount, "MATCH THIS BLOCK")
import "./something"
import "./something.txt";
import "./something.php";
import "./blha.js";
import "./blah.ts";
I need to match everything in " " but if there is starts with word import then skip
The result: "MATCH THIS BLOCK"
CodePudding user response:
You can use this regular expression:
(?<!import\s)"(.*)"