# regex to extract substring from the string

**URL:** <https://community.dynatrace.com/t/regex-to-extract-substring-from-the-string/22966>\
**Category:** Open Q&A\
**Tags:** request-attributes\
**Created:** [January 28, 2020, 11:13am UTC](https://community.dynatrace.com/t/regex-to-extract-substring-from-the-string/22966 "2020-01-28T11:13:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![cp\_patel](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@cp\_patel](https://community.dynatrace.com/u/cp_patel)\
**Post date:** [January 28, 2020, 11:13am UTC](https://community.dynatrace.com/t/regex-to-extract-substring-from-the-string/22966/1 "2020-01-28T11:13:00Z")

</div>

I have a request attribute which returns me a value as a long string.

For example :

xxxxxx|PRTL4797897|RHMP8453|442275| **6610.00** |HMP|428094|03|INR|VDDIRECT|05-NA|NA|00000000.00|24-01-2020 16:36:12|0300|NA|3308031910026362|NA|NA|NA|NA|NA|PAYMODE|NA|PGS10001-Success|1175508963

I only want extract the value which is bold and underlined(6610.00), which indicated the amount paid by end users to customer and finally want to do sum of all the extracted values to show the final premium received by customer in a dashboard in a day. Can anyone help with regex which I can apply here, **Further restrict or process captured parameters** section of request attribute. The settings of request attribute is attached here which returns me a text data as a return value of some java method.

 ![23403-req-attribute-capture.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/9/4904f9e0e64c2ffae481937b659838bfba559192.png)

---

_[View the full topic](https://community.dynatrace.com/t/regex-to-extract-substring-from-the-string/22966)._
