Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
shorten file paths in a commandline using regex
using System; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(String[] args) { string pattern = @"(""[^\\]+\\)(?:[^\\""]+\\)*([^""]+"")"; string input = "regedit.exe /e:a \"D:\\data\\backup\\laptop\\CCleaner\\CCleaner.reg\" \"HKEY_CURRENT_USER\\Software\\Piriform\\CCleaner\""; string replacement = "$1...\\$2"; Regex rgx = new Regex(pattern); string result = rgx.Replace(input, replacement); Console.WriteLine("Original String: '{0}'", input); Console.WriteLine("Replacement String: '{0}'", result); } } }
run
|
edit
|
history
|
help
0
sdfgthyjukiujyhtgrf
wwee
Encapsulation and abstration
Random number between 1 - 100 between each value of 10 there will be a differnt message
Vídeo01 - Main
subbareddy
isanagram
Unicode Braille Patterns.
a5
DateTime Subtract TotalDays