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
How do I dynamically sum up/display customcontrol (ascx control in the item template) values into an asp:repeater footer?
Excel VBA Bloomberg function
Hex to ASCII conversion in C#
Need a SUM
Creation of RAID device fails
JQuery based image (actually an element of code) rotator
WRVS4000 Router in front of Cisco ASA
Reference a selected rows column value from a gridview in VB .Net 3.5
Get Access Database online
Network Device