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
Mysql Query to select from two tables
Retrieve a list of unique values from a list object
how can I enter a genuine product key in Windows 7
Server 2008 R2 print server vs. XP clients
How do I delete a file from a folder (uploads directory) when I delete its reference in the database?
Installing SSL certifcate on exchange 2010
Get CPU Cores Amount
After moving mailbox to Exchange 2007 lost all Outlook rules
How to export distributions lists from active directory
Installer error 2869 Windows 7