checking a string for non-digit characters

Hi experts,

I have this working fiddle:
https://jsfiddle.net/ynm498pv/4/

In this example I have a textbox.

I'm using regex to check the input.

Right now if you type the less than symbol < followed by any numbers [0-9] a space is placed between the < and the number that was typed like this:

R4.PNG
Notice that when I type < followed by letters like this <m it's not putting a space in between.

How do i revise my example to also put a space in between when I type < followed by a lowercase or upper case letter or symbol?
I'm using this regex for that <[^0-9]

The only time a space should not be put in between, is when I type less than symbol followed by the equals sign <= that shouldn't get a space in between.,

So sample texbox output would look like this. Notice how only time it didn't get a space in between after the < symbol is when I typed = after it.

< 4dsmmdfs < tyfsd < 9s < Twe <= fsddskj
LVL 1
maqskywalkerAsked:
Who is Participating?
 
ozoConnect With a Mentor Commented:
<[^=]
0
 
maqskywalkerAuthor Commented:
where would that go in the fiddle?
0
 
maqskywalkerAuthor Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.