?
Solved

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

Posted on 2003-12-02
6
Medium Priority
?
596 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 200 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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. …
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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…
Suggested Courses

800 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