I have a field Threshold which has a value "+-5%", ">20%", "<30%" etc, which i want to convert into a number.
Could you please suggest how can i remove the leading and trailing symbols so that i can achieve the numeric value only.
@bonddodla try the following rex command on your Threshold
field
| rex field="Threshold" "(?<Threshold>\d+)"
Following is a run anywhere example based on sample data provided in the question
| makeresults
| eval Threshold="+-5%,>20%,<30%"
| makemv Threshold delim=","
| mvexpand Threshold
| rex field="Threshold" "(?<Threshold>\d+)"
Thanks. It worked
@bonddodla try the following rex command on your Threshold
field
| rex field="Threshold" "(?<Threshold>\d+)"
Following is a run anywhere example based on sample data provided in the question
| makeresults
| eval Threshold="+-5%,>20%,<30%"
| makemv Threshold delim=","
| mvexpand Threshold
| rex field="Threshold" "(?<Threshold>\d+)"