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
Mahesh MMahesh M 

Regix too complicated exception

*While uploading the morethan 4k records then getting  Regix too complicated exception  in “final String[] csvLines = csvContents.split('\n');”  line  due to big string is not working here.

Can anyone help me?
AbhishekAbhishek (Salesforce Developers) 
Hi Mahesh,

What are some of the reasons for getting the "Regex too complicated" error? As documented here: Salesforce limits the number of times an input sequence for a regular expression can be accessed to 1,000,000 times. If you reach that limit, you receive a runtime error.

The below article will understand completely about "Regix too complicated exception" errors

For further reference, you can check the below blog too,

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Mahesh MMahesh M
Hi Abhishek,

TY for ur response , do you know how to split the content ?
AbhishekAbhishek (Salesforce Developers) 
No, Mahesh, I don't have knowledge about it.