Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
Reg Expressions. Match A Full Stop?
This is a discussion on Reg Expressions. Match A Full Stop?, within the Javascript section. This forum and the thread "Reg Expressions. Match A Full Stop?" are both part of the Programming Your Website category.
![]() ![]() |
May 29 2008, 06:04 AM
Post
#1
|
|
|
Master of the Universe ![]() ![]() ![]() ![]() ![]() ![]() Group: Mentor Posts: 1,069 Joined: 15-February 08 From: London, England Member No.: 141 |
I am trying to cut out commas and full stops from numbers. I checking against ParseInt to see if the number is valid. If it is I am trying to check for commas and periods. Commas are not a problem.
However The full stop is a proving rather hard to pin down. Why isn't this working? PriceStr.match('/\./') EDIT: Solved by using 'lastIndexOf' instead. Am still interested to find out how to match a full stop though. -------------------- |
|
|
May 29 2008, 06:21 AM
Post
#2
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 551 Joined: 13-February 08 From: Catching the squeezed drips downunder. Member No.: 13 |
In Javascript you don't put quotes around your regex patterns.
PriceStr.match(/\./); is what you need -------------------- Bright Idea? -- Don't Let it disappear
|
|
|
May 29 2008, 06:34 AM
Post
#3
|
|
|
Master of the Universe ![]() ![]() ![]() ![]() ![]() ![]() Group: Mentor Posts: 1,069 Joined: 15-February 08 From: London, England Member No.: 141 |
In Javascript you don't put quotes around your regex patterns. PriceStr.match(/\./); is what you need -------------------- |
|
|
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
4 | Simon | 150 | 14th February 2008 - 11:01 AM Last post by: Simon |
|||
![]() |
4 | Jason | 118 | 15th February 2008 - 01:40 PM Last post by: rewake |
|||
![]() |
0 | thesealportalteam | 95 | 29th February 2008 - 09:40 AM Last post by: thesealportalteam |
|||
![]() |
2 | 902 | 93 | 18th March 2008 - 11:00 PM Last post by: Rakuli |
|||
![]() |
0 | katrinasuzanne | 145 | 12th August 2008 - 06:37 AM Last post by: katrinasuzanne |
|||






May 29 2008, 06:04 AM








