I am trying to figure out the best way to do this...

Given a string 

```
s = "if someBool || x==1 && y!=22314" 

```

I'd like to use Ruby to seperate statements and boolean operators.. so I'd like to split this into

```
["if","someBool","||","x","==","1","&&","y","!=","22314"]

```

I could use s.split(), but this only splits with space as delimeters..but I'd like x!=y to be split too (they are valid boolean sentences, they just dont have space in between for good readability). Of course the easiest way is to require the user to put space between boolean operator and variables, but are there any other way to do this?