function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vinayakamurthy15vinayakamurthy15 

line breaks not allowed in string literals error

I am taking String s ='aa\aa'; and tried to run in developer console, it shows the following error as Invalid string literal 'aa\aa'. Illegal character sequence '\a' in string literal.,,  but i want to save this in object as a record .. how can i do that? 

Deepa.B.AnkaliDeepa.B.Ankali
@vinayakamurthy

Try this

String s = 'aa'+'\\'+'aa';
Bhawani SharmaBhawani Sharma
Use String s ='aa\\aa';
This will be saved as you want.
Surendra123Surendra123

Testing4 (Testing/500)

 

I have a string some thing like this i need to

 


Testing/123( testing/2345   i want 2345 value  to be displayed any help