# findstr help

**URL:** <https://community.f5.com/t/findstr-help/35139>\
**Category:** Technical Forums\
**Tags:** deployment, design, irules, devops, application-delivery\
**Created:** [December 12, 2013, 2:06pm UTC](https://community.f5.com/t/findstr-help/35139 "2013-12-12T14:06:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AngryCat\_52750](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@AngryCat\_52750](https://community.f5.com/u/AngryCat_52750)\
**Post date:** [December 12, 2013, 2:06pm UTC](https://community.f5.com/t/findstr-help/35139/1 "2013-12-12T14:06:27Z")

</div>

I am trying to phrase txt xml for a username and password.. i am getting the username fine but the password is tripping me up..

the txt looks like this -

```tcl
<CustID>CaptAmerica</CustId>
</CustId>
<CustPswd>
    <EncryptionTypeCd>NONE</EncryptionTypeCd>
    <Password>test123</Password>
</CustPassword>

```

the iRule looks like this -

```tcl
when HTTP_REQUEST_DATA {
        set username [findstr [HTTP::payload] "CustId>" 15 "&"]
        set password [findstr [HTTP::payload] ";Password>" 6 "&"]
        log local0. "Username - $username , Pwd - $password"
}

```

the log msg comes out like this - Username - Username - CaptAmerica, Pwd - gt;test123

Any ideas??

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [December 12, 2013, 2:26pm UTC](https://community.f5.com/t/findstr-help/35139/2 "2013-12-12T14:26:07Z")

</div>

Not sure what your skip count numbers are supposed to indicate, but try this:

```tcl
set username [findstr [HTTP::payload] "CustID>" 10 "&"]
set password [findstr [HTTP::payload] ";Password>" 13 "&"]

```
