Burp Suite User Forum

Create new post

RegEx does not work properly on HTTP Request and Response

marduc812 | Last updated: Jan 12, 2021 10:24PM UTC

Hello I want to use regex to remove those empty lines from the HTTP responses that developers placed there. I used ^ to get the beginning of each line, but what it returns is just the first line of the response and nothing else (screenshot link below). To be sure that regex works in general I used \r\n and I can see indeed the new lines being highlighted. When i combine this search (^\r\n) there are 0 results returned, while i expected to have numerous due to all those empty lines. Screenshot: https://i.imgur.com/1Pf2Qdt.png

Michelle, PortSwigger Agent | Last updated: Jan 14, 2021 02:55PM UTC

Hi Thanks for your message If you prefix your regex search term with (?m) this will turn on multi-line mode, so this will find the empty lines for you: (?m)^\r\n Please let us know if you need any further assistance.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.