Reputation: 33
I am a complete regular expression idiot, just keep that in mind :)
I am trying to create a regular expression that will match link:xxxxxx
where everything after link: is a wildcard.
Can i just do link:*
or am I totally misguided?
Upvotes: 0
Views: 68
Reputation: 5802
link:.*
should work correctly.
.
matches any character, and you want to repeat it "0 to unlimited" times so you add *
.
If you're new to regex, a good way to learn it is by using regex101.
For your problem, you can check out this regex101 example
(Note that I have also added the g
modifier, which means that you want to select all matches, not just the first matching line)
Upvotes: 4