Microsoft
Software
Hardware
Network
Question : Find position of second to last period in a string
How do I take a string and remove the part of the string before the second to last period (including that period and if it exists).
Example
"abc.efg.ggg.this.part" returns "this.part"
"this.part" returns "this.part"
"f.this.part" returns "this.part"
"f.f.f.f.this.part" returns "this.part"
Answer : Find position of second to last period in a string
var s='abc.efg.ggg.this.part';
document.write(s.split("."
).slice(-2
).join("."
));
Random Solutions
Outlook 2010 NK2 file
Cannot Create a Fax Account in Windows 7
Add Property to asp.net user control to make reusable
Firefox css border on inside of div when embedding Flash with SWFObject, why?
Auto Send Excel as Email Attachment
service restart after logrotate
how to install and configure new GPFS cluster in AIX LPAR Workload environement?
Screen resolution changed - Fedora 13
Microsoft PKI Design
SQL 2005 SQL Syntax Help Needed