|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How many times does a character appear
I've done this before but cannot remember how.
I have a field (FIELDNAME) in a sql2k environment. I just need to know how many times an "_" appears in that field. Pretty simple, but I cannot figure it out right now. Thanks! *** Sent via Developersdex http://www.developersdex.com *** Joey Martin wrote on 09 dec 2005 in
microsoft.public.inetserver.asp.general: > I've done this before but cannot remember how. ASP-js:> > I have a field (FIELDNAME) in a sql2k environment. > > I just need to know how many times an "_" appears in that field. > > Pretty simple, but I cannot figure it out right now. t = 'qwe_rtyq_uerty' n = t.replace(/[^_]/g,'').length -- Evertjan. The Netherlands. (Replace all crosses with dots in my emailaddress)
Other interesting topics
|
|||||||||||||||||||||||