Regex.Replace(myString, ".{8}", "$0,");
If you want an array of eight-character strings, then the following is probably easier:
Regex.Split(myString, "(?<=^(.{8})+)");
which will split the string only at points where a multiple of eight characters precede it.
More Related Contents:
- How can I format a number into a string with leading zeros?
- Format a string into columns
- String.Format – how it works and how to implement custom formatstrings
- Is there a “String.Format” that can accept named input parameters instead of index placeholders? [duplicate]
- Display Float as String with at Least 1 Decimal Place
- Using variables inside strings
- C# how to check if a string contains 3 times the same letters in a row [closed]
- How to trim after 1 letter from space C#? [closed]
- How would you count occurrences of a string (actually a char) within a string?
- How do I parse a string with a decimal point to a double?
- Splitting a string into chunks of a certain size
- Color different parts of a RichTextBox string
- How can I String.Format a TimeSpan object with a custom format in .NET?
- Convert int to string?
- String Concatenation using ‘+’ operator
- Difference between string and StringBuilder in C#
- How to parse a string into a nullable int
- Compare version numbers without using split function
- Split a string with delimiters but keep the delimiters in the result in C#
- How to convert DateTime to/from specific string format (both ways, e.g. given Format is “yyyyMMdd”)?
- How do I get around the “‘” problem in sqlite and c#?
- Converting string expression to Integer Value using C# [duplicate]
- Compare string similarity
- Write bytes to file
- Java equivalent of C#’s verbatim strings with @
- Converting a byte to a binary string in c#
- C# date formatting is losing slash separators
- String.Format an integer to use a thousands separator without decimal places or leading 0 for small integers
- Get values between curly braces c#
- what’s the use of string.Clone()?