I suck at regular expressions

Open
#215 45 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
tooling

Research direction

No repository file, test, or entry point is identified. Start by reviewing the issue and its discussion for the intended implementation context, then verify matching and replacement behavior against both example strings; done means the requested URL substring can be identified and replaced reliably.

Written by the indexing model from the issue text.

Description

I'm like an NBA player who for some reason can't shoot foul shots. Only with me it's regular expressions. I used to do them all the time. Now I'm no good at it for some reason. Please help. Thanks.

I want to find a url like this in a string:

https://t.co/B8vzgwK5iX

An example of its usage:

How to Wash Fruits and Vegetables. https://t.co/ROcD5Tsz4f #giftlink

In other words the substring will always begin with https://t.co/, will be followed by a string of uppercase and lowercase alpha and numeric characters, followed by the end of the string or a whitespace character.

I need to be able to get the actual url and be able to easily replace it with another string.

Thanks! 😄

Dominant language
HTML
Stars
134
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/Scripting-News

All issues in scripting/Scripting-News

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.