I m trying to write RE for the above code as:
option value="(.*?)"
We can use regular expression extractor to get almost anything we want. Then we can use that anything in our post method.
Example — we get a value with extractor and store it to value1. Afterwards we apply it to the post method by using ${value1}.
However is this what you are asking? You should specify what value you want to extract and at least show us the html response to see if your extractor is the right deal.
Regular Expressions can be applied to any response field (including body, headers, URL and code) and to request headers. So if you're trying to get an option value it is possible as it evidenced by the following View Results Tree listener snapshot:
By the way, sometimes it is not a good idea to use regular expressions for parsing HTML so consider using following post processors as well:
as it might be easier to get certain response bits especially when response is multiline and has complex structure.