Microsoft
Software
Hardware
Network
Question : Remove special character from string
using C# I have a string which is a filename of a file being uploaded. on some systems a period can be used as part of a filename like ".testfile.pdf" I need to remove the period only if it is the first character in the string. I have tried replace but all periods are removed and i haven't been able to tuse regex either.
Answer : Remove special character from string
you can use TrimStart from string to do that:
http://msdn.microsoft.com/
fr-fr/libr
ary/
system
.string.tr
imstart.as
px
for example:
string cleanFileName = ".testfile.txt".TrimStart(
'.');
Random Solutions
Exchange 2003 Cluster, Event ID: 1080 occurs every three seconds
MS Access - First and Last Name field into Full Name
trying to read (compressed) laptop disk...
XP SP3 PROBLEM
ms office oem vs licensing
IE7 freezes on certain websites (w and w/out addons)
Exporting Access Query To Excel: Format Currency to Number
Problem with DoCmd.RunSQL "INSERT INTO " and memo fields
Excel Conditional Column Input
Having a weird Format Conditions problem...