DEV Community

loading...

Discussion on: Daily Challenge #305 - Remove Anchors from URLs

Collapse
markmead profile image
Mark

In Ruby

def remove_url_anchor(url)
  url.split('#').first
end
Enter fullscreen mode Exit fullscreen mode
Collapse
jffrydsr profile image
Jeffrey Desir

Ha! I love the English like precision in syntax.