How to escape slashes in regex?

前端 未结 2 1849
隐瞒了意图╮
隐瞒了意图╮ 2021-01-21 20:23

I\'ve made some regex to test for a YouTube embedded video:

/^(http:\\/\\/www\\.youtube\\.com\\/embed\\/)[^\\/\\s\\\\]+$/

It works for what I e

2条回答
提交回复
热议问题