Skip to content

Regex doesn't work for these cases #9

@a1Gupta

Description

@a1Gupta

https://www.youtube.com/HamdiKickProduction?v=DFYRQ_zQ-gk
https://www.youtube.com/feed/trending

Also why is video id length range 6-11? From what I found, video ids are 11 chars.

Activity

changed the title [-]Regex doesn't work for this case[/-] [+]Regex doesn't work for these cases[/+] on Jul 27, 2017
tunnckoCore

tunnckoCore commented on Jul 27, 2017

@tunnckoCore
Member

What you mean with the trending link? It's not meant to work for /feed/trending, that's not an ID.

Also why is video id length range 6-11? From what I found, video ids are 11 chars.

Because i found that they are between 6-11, at least there may be some old that are 6, don't know.
I any case it's not just some random range chosen by me.

tunnckoCore

tunnckoCore commented on Jul 27, 2017

@tunnckoCore
Member

As about youtube.com/HamdiKickProduction?v=DFYRQ_zQ-gk, it redirects to /watch in any way.
I don't believe we can handle any crazy case other there with just regex :D They are pretty good and powerful, but not always.

a1Gupta

a1Gupta commented on Jul 27, 2017

@a1Gupta
Author

Trending link is not a valid video url but regex matches this url - youtube.com/feed/trending

tunnckoCore

tunnckoCore commented on Jul 27, 2017

@tunnckoCore
Member

Oh, right, got it.

a1Gupta

a1Gupta commented on Jul 27, 2017

@a1Gupta
Author

Because i found that they are between 6-11, at least there may be some old that are 6, don't know.
I any case it's not just some random range chosen by me.

Can you share the reference for this? Here is a link which discusses about it.

a1Gupta

a1Gupta commented on Jul 27, 2017

@a1Gupta
Author

As about youtube.com/HamdiKickProduction?v=DFYRQ_zQ-gk, it redirects to /watch in any way.
I don't believe we can handle any crazy case other there with just regex :D They are pretty good and powerful, but not always.

Makes sense.

tunnckoCore

tunnckoCore commented on Jul 27, 2017

@tunnckoCore
Member

Can you share the reference for this?

No, I don't remember it. But thanks for the link!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tunnckoCore@a1Gupta

        Issue actions

          Regex doesn't work for these cases · Issue #9 · regexhq/youtube-regex