Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

RegEx help

$
0
0

I'm trying to find a regex that can match a pattern like this:

'/questions/100135507/even-after-completing-the-final-project-i-am-not-seeing-course-complete-message#ud617'

I might be close:

'/questions/\d+/(?:\w\W{0,})#ud617'

I'm having a hard time to find the regex syntax that will cover  the letters and dashes from '/questions/100135507/' to '#ud617'.

So I need something like "1 or more of \w (a-z) with 0 or more \W (for the dash), and these are interchangeable", but that I could have the above, or just as easily:

'/questions/100135507/even#ud617'

'/questions/100135507/even-after-completing#ud617'


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>