Using sed with regex to remove text from a file – Nginx
I'm trying to use sed with regex to remove specific patterns from a file. Here is the command I'm using: sed '/location .*?/s+{(?:[wW]+?)}s*(?=(?:location|$))/d' Here is a sample text I'm testing with: location / { try_files $uri $uri/ /index.php?$args; } location…