A blog containing Salesforce coding examples in detail.It's a place where you can find solutions to the problems that you may face in your daily salesforce coding. Apex classes,visual force page,we services,Integration,plugins,extensions,Lightning web components,Aura components,Email Messages,Sales cloud,service Cloud,Marketing Cloud.
Amazon Affliate Link: https://amzn.to/43zNb70
Play Games
▼
Thursday, June 23, 2016
Regular expression to remove consecutive alphabets in apex
Examples :If input is "aabbbbcccdddd" output should be "abcd". Piece Of Code:
String str ='aaaabbbbcde';
string resultedString = (str).replaceAll('(.)\\1+', '$1');
No comments:
Post a Comment