+ 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

https://help.salesforce.com/articleView?id=000325937&language=en_US&type=1&mode=1

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

https://developer.salesforce.com/forums/?id=906F00000008xTLIAY

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

Thanks.
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.