I have a textarea where i want the user to just enter the values: $x $y $z $a $b $c (,),+,-,*,/ ^

Here what i have so far

Formula
    <textarea name="formula" onkeyup="check(this.value)" ></textarea>

javascript

function check(formula) {
    ????
			

		}

Thanks in advanced

make regular expression which is allowed only this kind of charaters and then validate it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.