Overview
Parsing blocks extract structured data from HTTP responses, HTML pages, and other text sources. IronBullet provides multiple parsing methods:- ParseJSON: Extract data using JSONPath
- ParseRegex: Pattern matching with regular expressions
- ParseLR: Left-right string extraction
- ParseCSS: CSS selector queries for HTML
- ParseXPath: XPath queries for XML/HTML
- ParseCookie: Extract specific cookies
- LambdaParser: Custom JavaScript expressions
- Parse: Unified parser with all modes
ParseJSON
Extract data from JSON responses using JSONPath syntax.Settings
Variable containing JSON to parse
JSONPath expressionExamples:
json.token- Extract top-level token fielddata.users[0].email- First user’s emailresponse.items[*].id- All item IDs
Variable name to store extracted value
Capture as user-visible variable
Example
data.AUTH_TOKEN = "abc123"
ParseRegex
Extract data using regular expressions with capture groups.Settings
Variable containing text to parse
Regular expression patternUse capture groups
() to extract specific partsOutput format using capture group referencesExamples:
$1- First capture group$1:$2- Combine multiple groupsUser: $1, ID: $2- Custom formatting
Variable name to store result
Capture as user-visible variable
Enable multi-line mode (^ and $ match line boundaries)
Example
data.EMAIL = "john@example.com"
ParseLR
Extract text between left and right delimiters (simple string extraction).Settings
Variable containing text to parse
Left boundary string
Right boundary string
Variable name to store extracted text
Capture as user-visible variable
Extract all matches (creates array)
Ignore case when matching delimiters
Example
data.SESSION = "xyz789"
ParseCSS
Query HTML documents using CSS selectors.Settings
Variable containing HTML to parse
CSS selectorExamples:
div.username- Element with class#token- Element by IDinput[name='csrf']- Input by attributetable tr:first-child td- Table cells
Attribute to extractSpecial values:
innerText- Text contentinnerHTML- HTML contentvalue- Form input value- Any HTML attribute name
Variable name to store result
Capture as user-visible variable
Index of element to extract (when multiple matches)
Example
data.CSRF = "csrf-abc123"
ParseXPath
Query XML/HTML documents using XPath expressions.Settings
Variable containing XML/HTML to parse
XPath expressionExamples:
//div[@class='username']/text()- Text content//meta[@name='csrf-token']/@content- Attribute value//table//tr[1]/td[2]- Table cell
Variable name to store result
Capture as user-visible variable
Example
ParseCookie
Extract a specific cookie from the cookie jar.Settings
Variable containing cookies
Name of cookie to extract
Variable name to store cookie value
Capture as user-visible variable
Example
LambdaParser
Execute custom JavaScript expressions to transform data.Settings
Variable containing input data
JavaScript arrow function expressionThe input is available as
xExamples:x => x.split(',')[0]- First CSV itemx => x.trim().toUpperCase()- Uppercase trimmedx => JSON.parse(x).data.token- Parse and extract
Variable name to store result
Capture as user-visible variable
Example
Unified Parse Block
TheParse block combines all parsing modes into a single configurable block.
Settings
Parsing method:
LR, Regex, Json, Css, XPath, Cookie, LambdaVariable containing data to parse
Variable name to store result
Capture as user-visible variable
Mode-Specific Settings
Additional settings depend on the selectedparse_mode. See individual parser documentation above.
Best Practices
- Use the simplest parser that meets your needs (LR is faster than Regex)
- Test patterns with sample data before deployment
- Set capture=true only for variables you need in results
- Use descriptive output_var names for clarity
- Chain parsers when extracting nested data