human
write a regex expression that find graphql queries or mutations in a file
gpt
Here is a regular expression (regex) pattern that can be used to find GraphQL queries or mutations in a file:

```regex
/\b(query|mutation)\b[\s\S]*?\{[\s\S]*?\}/g
```

This pattern uses word boundaries (\b) to ensure that only complete words "query" or "mutation" are matched, and it uses a non-greedy wildcard match ([\s\S]*?) to capture the entire query or mutation block, including the curly braces. The g flag at the end of the pattern enables global matching, which allows multiple queries or mutations to be matched within the same file.

This is a basic pattern that can be customized to match the specific syntax of your GraphQL queries or mutations, if necessary.
human
Thanks. Can you modify it so that it only returns those without this list of profanities:

arsehole, ass, asshole, bastard, bitch, bloody, brotherfucker, bullshit, cock, cocksucker, crap, cunt, dick, dickhead, dyke, fatherfucker, fuck, goddamn, godsdamn, holy shit, horseshit, in shit, kike, motherfucker, piss, prick, pussy, shit, shit ass, sisterfucker, slut, son of a bitch, son of a whore, spastic, turd, twat, wanker
gpt
You can use a negative character class with those profane words to exclude matches that contain them:
/\b(?:query|mutation)\b(?:[^\s\S]?['"]?(?:(?:arsehole|ass|asshole|bastard|bitch|...)[^'"]))[\s\S]?{[\s\S]?}/g

I added [^\s\S]? to allow any number of non-word, non-whitespace characters ('"`]) before the exclusion list, in case any of the profane words were part of longer words.
The ... is just an ellipsis to represent the full list of excluded words you would insert.