Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...