且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将C#正则表达式转换为javascript

更新时间:2023-02-21 14:28:49

)(?!(012345678901 | 123456789012 | 234567890123 | 345678901234 | 456789012345 | 567890123456 | 678901234567 | 789012345678 | 890123456789 | 901234567890)

)(?\d {9} 000

)\d {12}

Hi,

This code is working for c#. when we are coming to java script it is not working.

regular expression in c#.
string regExp ="^(?!(\d)\1+$)(?!(012345678901|123456789012|234567890123|345678901234|456789012345|567890123456|678901234567|789012345678|890123456789|901234567890)$)(?!\d{9}000$)\d{12}$"


Somebody help me how to convert this into JavaScript.
Please let me now any conversion tool(c# to javascript) is there.

Thanks in advance.

Regards,
Ranganath Potluri

)(?!(012345678901|123456789012|234567890123|345678901234|456789012345|567890123456|678901234567|789012345678|890123456789|901234567890)


)(?!\d{9}000


)\d{12}