Solved

Regular Expression that detects WORDS \w with no vowel in it

Posted on 2003-12-02
6
594 Views
Last Modified: 2012-05-04
I can think of some parts needed to detect a word with no vowels in it, but can't figure out the whole thing (it's early!)..

I was thinking something along the lines of,

(\w[^a|e|i|o|u])

But thats not it...
0
Comment
Question by:Tacobell777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 31

Accepted Solution

by:
GwynforWeb earned 50 total points
ID: 9862320
/\W[^aeiou]+\W/i
0
 
LVL 17

Author Comment

by:Tacobell777
ID: 9862435
You rock!
Thanks

Stupid of me, ofcourse [^a|e|i|o|u] is a class so no OR | needed..

Ok, so your regex says

Non word characters - No aeiou At least once - Non word character

It doesn't make sense to me? It works, but I'd like to understand it too..
0
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 9862438
eg

<script>
reg=new RegExp(/\W[^aeiou]+\W/)
alert(" abcd " + "\n" +reg.test(" abcd "))
alert(" wxyz " + "\n" +reg.test(" wxyz "))
</script>
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 31

Expert Comment

by:GwynforWeb
ID: 9862444
Thanks GfW
0
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 9862506
It says

Non word characters - a sequence of non aeiou's   - Non word character

ie having a vowel between the nonword chars returns false
0
 
LVL 17

Author Comment

by:Tacobell777
ID: 9862624
Cheers...
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
web page freezes after ajax post 7 98
REST call Failing 1 39
Scroll 5 news at a time using vticker 2 39
Javascript Error 10 24
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question