'JMeter Regular Expression - Remove leading spaces

I have a regular expression that captures 17 matches. But these matches also include the spaces (leading or trailing).

Tried using [\s*]. But, some spaces still remain.

Screenshots are attached for your reference.

Please help.

Regards, Ajith

enter image description here

enter image description here



Solution 1:[1]

It's hard to come up with a comprehensive answer without seeing your response data (at least partial)

Try the following regular expression:

edison-system?\s*(.+?)?\s*?/

Where:

  • ?\s means optional whitespace
  • + - zero or more times

More information:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitri T