## Search Parameter

Search Parameter searches the data between the specified boundaries (prefix and suffix) in the incoming request and saves it into a parameter.

## Parameter Details

- Parameter Name:Unique name for the parameter.
- Prefix:The starting point from where the value is to be extracted in the request. If no prefix is provided, it uses all of the characters from the beginning of the request as prefix. Further, user can specify the binary data and regular expression in the prefix by selecting the ‘Binary Data’ and ‘Regular Expression’ check box respectively.

Suffix: The ending point up to which the value is to be extracted in the request. If no suffix is provided, it uses all of the characters until the end of the request as a suffix. Further, user can specify the binary data and regular expression in the suffix by selecting the ‘Binary Data’ and ‘Regular Expression’ check box respectively.

- Ignore Case for Prefix / Suffix:If user selects this, case will be ignored for prefix and suffix.

Example: if prefix / suffix is set to <welcome> or <WELCOME> both cases will be applicable upon selecting this check box.

- Binary Data : Upon selecting this check box, user can search for a string using its ASCII code.
- Regular Expression : Upon selecting this check box, user can search for a string by providing a regular expression.

## Advanced Settings

1. Search:Specifies the scope of the search i.e. where to search for the dynamic data. The possible values are:
   - Body (search only in body data, not headers) – Default is Body
   - Headers (search only in headers)
   - URL (search only in URL)
2. Occurrence Count:indicates the ordinal position or instance of the match.
   - Any:Randomly one of the occurrences is captured.
   - All:All occurrences are captured. Here parameter values are saved in an array
   - Specified:specified instance is captured. The default instance is 1.
3. Prefix Matching Mode:This is required if there are multiple occurrence of prefix in the request. Here you can use below option to select the prefix occurrence (Default is - Closest to Suffix.)
   - Closest to Suffix:Instance in which prefix is closest to the suffix is captured.
   - First in the Block:The first instance within the block is captured.
   - Specified:Only specified instance is captured.
4. Start Offset:This is required if only a part of the searched value is to be assigned to the parameter. It indicates the start of offset. The offset value must be non-negative. You can also start offset from the first character of the searched value by selecting from the Beginning check box
5. Maximum Length:It indicates the end of offset. You can also end offset till the last character of the searched value by selecting till the end check box
6. Transform:Specifies any built-in transforms, which need to be applied to the searched value before it is assigned to the parameter.

   There are fullowing options within this:

   - None:It uses the value as it is.
   - Reverse:It reverses the searched value. e.g. cavisson will be transform to ‘nossivac’
   - Upper Case:It transforms the searched value in upper case.
   - Lower Case:It transforms the searched value in lower case.
   - LTrim:It trims the white spaces (occurred at the left) from the searched value.
   - RTrim:It trims the white spaces (occurred at the right) from the searched value.
   - Trim:It trims the whitespaces (occurred at the left and right) from the searched value.

## Sample Request

- Template Name:Here, user can view sample request of the selected template from the dropdown list. All templates are listed in the drop down
- Set Prefix:Clicking this button sets the selected text as prefix in the parameter.
- Set Suffix:Clicking this button sets the selected text as suffix in the parameter.
- Beautify: It allows the user to format or beautify the request in a well-structured format. following format are supported:
  1. CSS
  2. Text
  3. HTML
  4. JavaScript
  5. XML
  6. JSON

Note
In case you have used Ord as ALL, you can retrieve value from array by using param_1, param_2, param_n at index 1, 2, n respectively