# Problem matching multiline text

**URL:** <https://forum.kirupa.com/t/problem-matching-multiline-text/315722>\
**Category:** Uncategorized\
**Created:** [November 2, 2010, 9:48pm UTC](https://forum.kirupa.com/t/problem-matching-multiline-text/315722 "2010-11-02T21:48:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jac4b](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jac4b](https://forum.kirupa.com/u/jac4b)\
**Post date:** [November 2, 2010, 9:48pm UTC](https://forum.kirupa.com/t/problem-matching-multiline-text/315722/1 "2010-11-02T21:48:48Z")

</div>

hi, i’m trying to check a multiline input text field (classic text, as2) for a correct answer, but it’s inserting an invisible paragraph return which screws it up. everything works, it’s fine when i choose single line but not multiline, any ideas anyone?

```auto
var SampleAnswer:String = "peanut butter and jelly sandwich";

var txtListen:Object = new Object();

txtListen.onChanged = function()
{
	CheckAnswer();
	trace(inputText.text);
};

inputText.addListener(txtListen);

function CheckAnswer()
{
	if (inputText == SampleAnswer)
	{
		//doSomething;
	}
}

```

traces this as i type and never matches the correct answer because of the extra paragraph return

```auto
p

pe

pea

pean

```
