# Tricky split attempt

**URL:** <https://forum.kirupa.com/t/tricky-split-attempt/257584>\
**Category:** Uncategorized\
**Created:** [April 15, 2008, 2:09pm UTC](https://forum.kirupa.com/t/tricky-split-attempt/257584 "2008-04-15T14:09:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulcybulski](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@paulcybulski](https://forum.kirupa.com/u/paulcybulski)\
**Post date:** [April 15, 2008, 2:09pm UTC](https://forum.kirupa.com/t/tricky-split-attempt/257584/1 "2008-04-15T14:09:48Z")

</div>

I am trying to split the following string and others like it…“Available - 10’ x 10’”

I want to get a string that contains the first 12 characters of the above example…so "Available - "

```auto

var temp:String = _global.exName[j-1].split(" - ")[0];

```

returns “Available”…the closest I have gotten is by typing split("- ") which yields "Available "…i need the "- " in there too though…and I want to do this without having to loop through an array to concatenate a string…is this possible?
