saidhruv
Member
Can you help me with a formula to replace double quotes available within a string with specific code? All odd double quotes have to be marked as 'lq' and all even double quotes to be marked as 'rq'.
A logic that has to be added is, in case of odd double quotes, the right most double quote is to be kept as it is and hence not to be replaced with code. Hence, in case string has only one double quote, it is not to be replaced.
Example:
Input: NEW"YORK Output: NEW"YORK
Input: NEW"YORK" Output: NEWlqYORKrq
Input: NEW"YO"R"K Output: NEWlqYOrqR"K
Input: NE"W"YO"R"K Output: NElqWrqYOlqRrqK
A logic that has to be added is, in case of odd double quotes, the right most double quote is to be kept as it is and hence not to be replaced with code. Hence, in case string has only one double quote, it is not to be replaced.
Example:
Input: NEW"YORK Output: NEW"YORK
Input: NEW"YORK" Output: NEWlqYORKrq
Input: NEW"YO"R"K Output: NEWlqYOrqR"K
Input: NE"W"YO"R"K Output: NElqWrqYOlqRrqK