There is a line: COUNTILES ('ISH_Disks'! $ B: $ B; C $ 3; 'ISH_Disks'! $ J: $ J; $ A18) SUM (C18: I18) AK18 + AT18 + AB18 + S18 + J18SUMM (U18: AA18 ) At the output, you need to get: COUNTIFS ('ISH_Disks'! $ B: $ B; C $ 3; 'ISH_Disks'! $ J: $ J; $ A18) U122: AA122)

What to write in a regular expression? var resultValue = "СЧЁТЕСЛИМН('ИСХ_Сделки'!$B:$B;C$3;'ИСХ_Сделки'!$J:$J;$A18)СУММ(C18:I18)AK18+AT18+AB18+S18+J18СУММ(U18:AA18)"; Writing

 alert(resultValue.replace(new RegExp("A18",'g'),"A122")); 

Changes only A18 to A122.

  • You wrote in replace - change A18 to A122 . What result did you expect? - Stepan Kasyanenko
  • Damn, logical))))) And how to act in this case? - Yaroslav Work Tolstoy
  • Watching what you want to do! - Stepan Kasyanenko
  • Possible duplicate question: Search backward in regular expression JS - Wiktor Stribiżew
  • Look at this answer , if it is not what you need, leave a comment there. No need to ask a few questions on the same problem. - Wiktor Stribiżew

0