Skip to content

How to match URLs with a colon in their name #274

Closed Answered by dougwilson
vlukashov asked this question in Q&A
Discussion options

You must be logged in to vote

You can use backslash to escape the colon. The backslash needs to be in the string, ans since Javascript itself treats backslash as a special characher, to get a backslash in a string requires escaping it, like so: '\\'. This means a string of your path, witten as a Javascript literal, would need to be '/wiki/Category\\::category'

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vlukashov
Comment options

Answer selected by vlukashov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants