5 consonants or more

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

5 consonants or more

Postby Valmont » Mon Jan 05, 2015 5:34 pm

Hi ,

How do I make a regex to match at least 5 consonants in a row,? It's for the ctrl+W poster lockout. T.
Valmont
Active Participant
Active Participant
 
Posts: 63
Joined: Wed Aug 09, 2006 2:51 pm

Registered Newsbin User since: 06/14/09

Re: 5 consonants or more

Postby KingFish » Sat Jan 10, 2015 4:12 am

[bcdfghjklmnpqrstvwxz][bcdfghjklmnpqrstvwxz][bcdfghjklmnpqrstvwxz][bcdfghjklmnpqrstvwxz][bcdfghjklmnpqrstvwxz]
MS Windows 10 Pro 64-Bit - ASUS P8Z77-V LE; Intel i7-3770K 3.5 GHz; 16.0GB DDR3; 512MB EVGA GeForce GTX 760; SAMSUNG 850 500GB SATA III SSD; 2 X HGST 3TB 7200RPM 6.0Gb/s SATA III.
User avatar
KingFish
Seasoned User
Seasoned User
 
Posts: 371
Joined: Mon Aug 13, 2001 5:17 pm

Registered Newsbin User since: 05/17/03

Re: 5 consonants or more

Postby Valmont » Sat Jan 10, 2015 5:41 am

Awesome, thanks.
Valmont
Active Participant
Active Participant
 
Posts: 63
Joined: Wed Aug 09, 2006 2:51 pm

Registered Newsbin User since: 06/14/09

Re: 5 consonants or more

Postby Quade » Sat Jan 10, 2015 9:11 am

Yeah that's good. A shortcut would be:

[bcdfghjklmnpqrstvwxz]{5}

You can use the {number} to set a range of matchs too. {6,9} for instance.

I was thinking about negating vowels and bogged down. This is better.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 42386
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: 5 consonants or more

Postby KingFish » Sat Jan 10, 2015 12:37 pm

:D Thanks, Quade.
MS Windows 10 Pro 64-Bit - ASUS P8Z77-V LE; Intel i7-3770K 3.5 GHz; 16.0GB DDR3; 512MB EVGA GeForce GTX 760; SAMSUNG 850 500GB SATA III SSD; 2 X HGST 3TB 7200RPM 6.0Gb/s SATA III.
User avatar
KingFish
Seasoned User
Seasoned User
 
Posts: 371
Joined: Mon Aug 13, 2001 5:17 pm

Registered Newsbin User since: 05/17/03

Re: 5 consonants or more

Postby Valmont » Sat Jan 10, 2015 1:03 pm

Quade wrote:Yeah that's good. A shortcut would be:

[bcdfghjklmnpqrstvwxz]{5}

You can use the {number} to set a range of matchs too. {6,9} for instance.

I was thinking about negating vowels and bogged down. This is better.

Appreciated, thanks.
Valmont
Active Participant
Active Participant
 
Posts: 63
Joined: Wed Aug 09, 2006 2:51 pm

Registered Newsbin User since: 06/14/09


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 1 guest