Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all.
Please, can you help me to create a regular expression to get a string based on this query
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Answer accepted by question author
An example:
string input = "Creativity is thinking-up new things. Innovation is doing new things!";
string result = Regex.Replace( input, @"(?<=\G.*\w)(\w*)(?=\w)", m => m.Value.ToLower( ).Distinct( ).Count( ).ToString("0;0;''" ) );
Console.WriteLine( input );
Console.WriteLine( result );
or:
string result = Regex.Replace( input, @"(?<=\G.*\w)(\w+)(?=\w)", m => m.Value.ToLower( ).Distinct( ).Count( ).ToString( ) );
Hi Viorel-1.
Can you do the same thing with Python?
Thanks in advance.