Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
177 views

ReplaceAll does not function Apex

Hello everybody I am managing data from a LWC form where the user inputs some data and I pass it to validate into an apex class. This validation manages the format of a date time value: I want the ...
user avatar
0 votes
2 answers
7k views

Removing leading zeroes in Date String

I have checked a number of posts and regex examples but for some reason I can't get the leading 0's to be removed from the date string below. Can anyone see what I am doing wrong? wanted result: 4/6/...
Olivia's user avatar
  • 3,491
0 votes
1 answer
980 views

Replace escaped quotes

I want to replace all escaped quotes, but leave default quotes. How can i do it? string s1 = '"five1,five2", six ,seven,"eig\"ht1,eight2","nine",,eleven'; String ...
murkofeste's user avatar
0 votes
1 answer
593 views

Replace Subject fields on Lightning Email Template

I'm having problems with replace() operations of text that I have in Subject of my Email Template. Subject is like: A - B - C My code is: EmailTemplate eTemplate = newEmail.searchForEmailTemplate('...
CPS's user avatar
  • 365
1 vote
2 answers
5k views

Replace character in string in specific position (ie not first, not all)

I would like to replace one character in a string with an uppercase of the same character. Is there an elegant way to do this? Eg I have 'Donald Mcdonald' and I would like to uppercase the first 'd' ...
Irene's user avatar
  • 1,885
0 votes
0 answers
1k views

Error escaping double quotes in large JSON string in Apex

I have large JSON response that I am trying to escape all instances of strings that are problematic for deserialization but am having some issues. Using .replaceAll works but that throws a "Regex too ...
626's user avatar
  • 273