Welcome to PcCare.com
Lots of C# Regular Expressions
//This example demonstrates the use of named backreferences within the replacement pattern for Regex.Replace. Here, the replacement expression ${day} inserts the substring captured by the group (?<day>…).
//This code extracts the file extension from a filename and displays it //using asp.net
<%# Regex.Replace(DataBinder.Eval(Container.DataItem,
// Remove all characters after the full path (arguments // c:\windows\test.exe -startup -> c:\windows\test.exe public static string Arguments(string fullpath) { Match m11 = Regex.Match(fullpath, ".*[.]exe"); return (m11.Value); }
// Remove quote characters from string // "c:\windows\test.exe -startup" -> c:\windows\test.exe -startup
public static string RemoveQuotes(string fullpath) { return(fullpath.Replace("\"","")); }
|
Please review our Terms of Service and Privacy statement before initiating service or using this site. Microsoft® and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. PcCare Site Map. About Us