# irule trimleft

**URL:** <https://community.f5.com/t/irule-trimleft/27560>\
**Category:** Technical Forums\
**Tags:** irules, devops\
**Created:** [January 20, 2017, 12:34pm UTC](https://community.f5.com/t/irule-trimleft/27560 "2017-01-20T12:34:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Dolega\_3](https://avatars.discourse-cdn.com/v4/letter/r/c37758/32.png) [@Robert\_Dolega\_3](https://community.f5.com/u/Robert_Dolega_3)\
**Post date:** [January 20, 2017, 12:34pm UTC](https://community.f5.com/t/irule-trimleft/27560/1 "2017-01-20T12:34:07Z")

</div>

Hello,

Below code

```tcl
set newuri2 [string trimleft "/status_cache/abcd" /status_cache]
log local0. "newuri: $newuri2"

```

gives output

**$1**

instead

**$1**

Any ideas why? Thanks in advanced for any help

/RD

---

<div class="post-metadata">

**Author:** ![nathe](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@nathe](https://community.f5.com/u/nathe)\
**Post date:** [January 20, 2017, 1:45pm UTC](https://community.f5.com/t/irule-trimleft/27560/2 "2017-01-20T13:45:50Z")

</div>

Robert - may i allow Jason to explain this better than i could. see [iRules 101 - 14 - TCL String Commands Part 2](https://devcentral.f5.com/articles/irules-101-14-tcl-string-commands-part-2)

See if string range works better for you i.e.

```tcl
set newuri2 [string range "/status_cache/abcd" 14 end]

```

Hope this helps,

N
