JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 1st, 2010, 08:42 PM
daprezjer's Avatar
daprezjer daprezjer is offline
hiding my <b> from ur <strong>
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2004
Posts: 944 daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level)daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level)daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level)daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level)daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level)daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level)daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level)daprezjer User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 6 Days 4 h 58 m 10 sec
Reputation Power: 180
Jscript regex match period or end of string

Just trying to get my regex to accept an end of string OR a period as a correct match.

So, say

ball
- or -
ball.

should work.

Thought it would be as easy as
[a-z]{1,8}[\.|$]

but that doesn't appear to be working. Any thoughts? Thanks.
__________________
****
Enjoy my post? Drop some props by hitting the scales button up top. JBL

Website Design in Los Angeles and Washington, DC by PoweredPages.com

Reply With Quote
  #2  
Old November 1st, 2010, 09:16 PM
requinix's Avatar
requinix requinix is online now
Still alive
Dev Shed God 16th Plane (12500 - 12999 posts)
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,877 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 5 Days 7 h 59 m 26 sec
Reputation Power: 8977
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
1. $ isn't a character like . or \w or \d. It's an assertion. It means "at this point the string has to end". Putting it inside a character set doesn't make sense, thus when you do so it reverts to the literal character (ie, "a dollar sign").
2. Using character set for a single character is quite unnecessary.
Code:
[a-z]{1,8}(\.|$)
Comments on this post
daprezjer agrees: Thanks, didn't get the specific functionality of a character set. Now I know.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Jscript regex match period or end of string

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap