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
linux router with iptables script
How to find the row count in an Oracle DataReader in ASP.NET?
Can print but not scan on Brother MFC-7840W on a Mac / "Connection Error"
Bash Shell script interview questions
error booting the ubuntu linux live cd
Cannot start the reminder service - Outlook 2007
group policy missing options
XP 10 inbound connection limit question
Just installed SQL Server 2005, but no instance appears
How to track ctrl+alt+del in oracle application