Hi all,
The following regex works when used in string.replaceall() but not in case of string.replaceFirst().
String:
TEST|X||Y|Z||
Expected output:
TEST|X|**STR**|Y|Z||
Regex:
string.replaceAll( "(TEST\\|[\\|\\|]*\\\\|)\\|\\|", "$1|ST|" );
Output (not desired):
TEST|X|**STR**|Y|Z|**STR**|
string.replaceFirst( "(TEST\\|[\\|\\|]*\\\\|)\\|\\|", "$1|ST|" );
No changes are made to the string.
Please help!
Thanks in advance.