Burp Suite User Forum

Create new post

Multiple Regex Matches In Intruder | Global Regex Toggle

Mel | Last updated: Aug 06, 2022 08:54PM UTC

For Intruder --> Options --> Grep - Extract, there doesn't currently appear to be a good way to return multiple regex matches. The suggested solution of "add another Grep - Extract with the same search to return the next match" isn't a good one if you have an unknown or varying length of matches (it's also rather tedious to copy the same extract rule several times even if you did know the # of matches you wanted to return). If you enable multiple matches, I suggest that you also allow the user to specify the delimiter in the results. For example in an intruder attack: - Response1 has 3 regex matches - Response2 has 2 regex matches - Intruder results have 2 rows -- Response1 row has one column with the title of the grep extract with all 3 results under that column like: --- match1,match2,match3 -- Response2 row has one column with the title of the grep extract with all 2 results under that column like: --- match1,match2 - I can now save the results table and do further processing on that helpful data Thanks!

Michelle, PortSwigger Agent | Last updated: Aug 08, 2022 11:22AM UTC

Another option that you might find useful in some situations could be to use 'Grep - Match' in addition to 'Grep - Extract', as this will give you count of how many times an expression has been matched within the response. I hope this helps.

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