# AS2: Split a string

**URL:** <https://forum.kirupa.com/t/as2-split-a-string/316180>\
**Category:** flash\
**Created:** [November 15, 2010, 11:42am UTC](https://forum.kirupa.com/t/as2-split-a-string/316180 "2010-11-15T11:42:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![540media](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/540media/32/2543_2.png) [@540media](https://forum.kirupa.com/u/540media)\
**Post date:** [November 15, 2010, 11:42am UTC](https://forum.kirupa.com/t/as2-split-a-string/316180/1 "2010-11-15T11:42:18Z")

</div>

Hi, can somebody help with this, just cant get a solution to the problem

I have an input box where users are entering they answer to a randomly generating algebra equations, I need to be able to break the string apart that they enter so that I can check their answer is correct

so 2x+3y-5 needs to be broken apart to 2x, 3y, -5

-5x-2y+7 needs to be -5x, -2y, +7

I just cant get it to split apart and remember what the +/- delimiters are, can anyone help me out??
