I was having a strange requirements last days and one of them is this one:
we have a string and we want to add a separator after 8 digit.
Here is the post which help me to achieve the my solution:
http://stackoverflow.com/questions/9932096/add-separator-to-string-at-every-n-characters
Solution:
here is the solution that worked for me:
string x = "111111110000000011111111000000001111111100000000";
output should be :
"11111111,00000000,11111111,00000000,11111111,00000000,"
C# : Regex.Replace(myString, ".{8}", "$0,");
Javascript:
"111111110000000011111111000000001111111100000000".replace(/(.{8})/g,"$1,")
Subscribe to:
Post Comments (Atom)
What is the Use of X and Y Properties in Power Apps SharePoint List Form?
If you've spent any time customizing SharePoint List Forms using Power Apps, you've likely come across the X and Y properties ...
-
Code Review :- General 1. Remove the commented code 2. Variable name should not be contain "_". 3. Query should be in separat...
-
In last blog we learn how can we enable footer on SharePoint Online Modern Communication site. If you have not gone through that you can use...
-
Issue : Recently, we had a requirement to sync the calendar between shared mailbox outlook and SharePoint Calendar list. We have created 2 f...
No comments:
Post a Comment