earthdance
New member
- Joined
- Apr 1, 2006
- Messages
- 4
Hello, I have this regular expressions (thanks to jo0ls for providing it)
([A-Za-z0-9]+)|([^A-Za-z0-9]+)
But I would like to add the functionality to also detect in the first class words that have a number attached to them, for example 9word word9word word6 ...
The first cass DOES this but it will also detect numbers that are all by themselves without a word attached... and this is what I am trying to avoid.. any ideas?
e.g:
word -> matches first class
word9 -> matches first class
9word9 -> matches first class
wo9rd -> matches first class
8 -> matches second class
10 -> matches second class
any other char -> matches second class
([A-Za-z0-9]+)|([^A-Za-z0-9]+)
But I would like to add the functionality to also detect in the first class words that have a number attached to them, for example 9word word9word word6 ...
The first cass DOES this but it will also detect numbers that are all by themselves without a word attached... and this is what I am trying to avoid.. any ideas?
e.g:
word -> matches first class
word9 -> matches first class
9word9 -> matches first class
wo9rd -> matches first class
8 -> matches second class
10 -> matches second class
any other char -> matches second class