Board index » javascript » help for regular expression
|
graphicsxp
Registered User |
|
graphicsxp
Registered User |
help for regular expression
2008-01-25 01:16:16 AM
Hi, I can't figure out what the regular expression would look like for validating a string such as : Lastname, Firstname I could only come up with /\w/ which doesn't check for the comma. Can someone help ? Thanks - |
| Martin Honnen
Registered User |
2008-01-25 01:31:00 AM
Re:help for regular expression
graphicsxp@googlemail.com wrote:
QuoteI can't figure out what the regular expression would look like for Martin Honnen JavaScript.FAQTs.com/ - |
| graphicsxp
Registered User |
2008-01-25 01:43:00 AM
Re:help for regular expression
On 24 Jan, 17:31, Martin Honnen <mahotr...@yahoo.de>wrote:
Quotegraphic...@googlemail.com wrote: The expression needs to check for litterals only and one comma only. Thanks - |
| Lee
Registered User |
2008-01-25 02:20:00 AM
Rehelp for regular expression}
graphicsxp@googlemail.com said:
Quote
followed by more than zero alphabetic or numeric characters. What do you believe "literal" means? If you want alphabetic characters only , the expression would be: /[a-z]+,\s*[a-z]+/i This also allows zero or more spaces or tabs (or other whitespace) after the comma. -- - |
| Thomas 'PointedEars' Lahn
Registered User |
2008-01-25 03:58:00 AM
Rehelp for regular expression}
graphicsxp@googlemail.com wrote:
QuoteOn 24 Jan, 17:31, Martin Honnen <mahotr...@yahoo.de>wrote: developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:RegExp Quoteas this would only check for the coma and other characters around the PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann - |
| Dr J R Stockton
Registered User |
2008-01-25 04:17:00 AM
Rehelp for regular expression}
In comp.lang.javascript message <c5dc03c1-54c7-410d-8d07-aa88b8d6dac6@n2
0g2000hsh.googlegroups.com>, Thu, 24 Jan 2008 09:16:16, graphicsxp@googlemail.com posted: Quote
Consider : Jean-Jacques Rousseau Patrick O'Brian Sir Ian Moncrieffe of that Ilk François Mitterand -- (c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:www.merlyn.demon.co.uk/>- FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036) Do not Mail News to me. Before a reply, quote with ">" or ">" (SonOfRFC1036) - |
| nolo contendere
Registered User |
2008-01-25 05:41:00 AM
Rehelp for regular expression}
On Jan 24, 1:20 pm, Lee <REM0VElbspamt...@cox.net>wrote:
Quotegraphic...@googlemail.com said: |
| Lee
Registered User |
2008-01-25 05:57:00 AM
Rehelp for regular expression}
nolo contendere said:
Quote
- |
