I am having a dynamic string like below:
"intro":"1.[Model=FS7200 NVMe Control, IOGroups=1, SystemMemory=1536 GiB, AdapterType=16 Gb FC 4 Port Adapter Pair, P1_Type=DRP, P1_ExtentSize=1024 MiB, P1_ThinProvisioning=0-49%, P1_Compression=0-49%, P1_Deduplication=0-49%, P1A1_IOGrp=1]\nAn explanation could not be generated for this combination\nThe following error occurred: Problem in restriction !(IOGroups.equals(\"1\")) || (!P1A1_IOGrp.equals(\"1\") && !P1A1_IOGrp.equals(\"2\") && !P1A1_IOGrp.equals(\"3\")) && P2A1_IOGrp.equals(\"NA\") && P2_Type.equals(\"NA\") && P2_ExtentSize.equals(\"NA\") && P2_ThinProvisioning.equals(\"NA\") && P2_Compression.equals(\"NA\") && P2_Deduplication.equals(\"NA\") && P2A1_DriveValues.equals(\"NA\") && P2A1_DriveTechnology.equals(\"NA\") && P2A1_DriveType.equals(\"NA\") && P2A1_ArrayType.equals(\"NA\") && P2A1_TargetGroup.equals(\"NA\") && P2A1_StripSize.equals(\"NA\")\nResulting expression is too large to handle. Please consider simplifying your restriction by breaking it into several simpler ones\n\n"
Here, I want to split it on following basis:
The text after An explanation
should show in next line.
The text after restriction
, and before Resulting
should show in blue color, and in next line.
The text after Resulting
should show in normal black color, and in next line.
I am able to do splitting based on second condition, but not completely.
{item.intro.search('restriction') > 0 &&
<h5>
{i+1}> {item.intro.split('restriction')[0]}restriction
<span style={{color:"blue"}}>
{item.intro.split('restriction')[1]}
</span>
</h5>}
How can I resolve this?