# regex to extract a InnerText

**URL:** <https://community.dynatrace.com/t/regex-to-extract-a-innertext/31084>\
**Category:** Open Q&A\
**Tags:** regex, request-attributes\
**Created:** [April 9, 2021, 6:48pm UTC](https://community.dynatrace.com/t/regex-to-extract-a-innertext/31084 "2021-04-09T18:48:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpereira2](https://avatars.discourse-cdn.com/v4/letter/f/85e7bf/32.png) [@fpereira2](https://community.dynatrace.com/u/fpereira2)\
**Post date:** [April 9, 2021, 6:48pm UTC](https://community.dynatrace.com/t/regex-to-extract-a-innertext/31084/1 "2021-04-09T18:48:04Z")

</div>

Hi all,  
I’ve problems with a filter regex, I need to filter a CSS, but the filter doesn’t work successfully,

I need to get some data in my registration and this register has step by step, so I need to follow these steps and know how many customers login in my registration.

For that, I put in Dynatrace → Session and Action Properties, a property in the CSS selector, to capture just the word:

ETAPA 1 OF 6

This expression means where my client is, (ETAPA = step), so I put the regex filter:

([ETAPD \ s \ d] {1,})

but I get other words too, like “GTrader + Simulator” and my filter gets a “T” because of that word.

I’m doing this chart, but he stay messy. Please, any help me!

 ![Dynatrace.PNG](https://global.discourse-cdn.com/dynatrace/original/2X/0/0c6787b44aa45a7ee8bbb482ae253918567a7399.png)

---

<div class="post-metadata">

**Author:** ![fpereira2](https://avatars.discourse-cdn.com/v4/letter/f/85e7bf/32.png) [@fpereira2](https://community.dynatrace.com/u/fpereira2)\
**Post date:** [April 9, 2021, 6:49pm UTC](https://community.dynatrace.com/t/regex-to-extract-a-innertext/31084/2 "2021-04-09T18:49:00Z")

</div>

![fpereira2_0-1617994122654.png](https://global.discourse-cdn.com/dynatrace/original/3X/b/f/bf560c221389f2c590c176d944103ea7ac7cbacd.png)

---

<div class="post-metadata">

**Author:** ![Radu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radu/32/23351_2.png) [@Radu](https://community.dynatrace.com/u/Radu)\
**Post date:** [April 12, 2021, 6:56am UTC](https://community.dynatrace.com/t/regex-to-extract-a-innertext/31084/3 "2021-04-12T06:56:04Z")

</div>

Hello,

Try this one:

```markup
(ETAPA \d)

```

The one you shared is looking for any letter, space or digit to appear 1 or more times and then captures the whole thing. With the one I suggested, you will be capturing exactly the text “ETAPA” followed by a space and one digit (e.g. “ETAPA 2”).

Let us know how that goes.

Best regards,

Radu
