sample data is like
@ID_111_I1_0.000_I2_0.00_I3_-0.999*
@ID_232_TS_09.0*
I created one regular expression like :
const reg = new RegExp(/^@ID_[A-Z0-9._-]*\*/i);
but this will show valid true for strings like @ID_111_I1_0.000_I2*
here I2 key is there, but its value is not showing
string start with this @ID . then split with _ key value pair and string end with *
Please help me with a solution !!!!
@ID_111_I1_0.000_I2*?/^@ID_[A-Z0-9.-]+(?:_[A-Z0-9]+_[A-Z0-9.-]+)*\*$/