Aniket Narvankar

Aniket Narvankar

  • 558
  • 2.1k
  • 608k

Javascript Regex

Feb 28 2022 7:37 AM

Have one requirement where suppose we insert value alphanumeric ABC123 then it should output as CCCNNN(Alphabets replace by C and numbers by N)

if value is ABC 123(then CCCSNNN) spcae is replaced by N

if values i ABC then CCC

if values is suppose 1234 then NNNN

How to write a regex for the same please do let me know about the same.


Answers (1)