E
E
Eugene Chefranov2020-04-22 19:40:37
Regular Expressions
Eugene Chefranov, 2020-04-22 19:40:37

How to write the correct regular expression?

There are links like this:

http://example.com/#hash
http://example.com/some-link#somehash
http://example.com/some-link/#somehash
http://example.com/category/some-link#anyhash
...


You need to get the last part with a lattice, like #hash, #somehash,#anyhash

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tigran Abrahamyan, 2020-04-22
@Chefranov

/#.+/g

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question