Forum Discussion
julienvdc
3 years agoHelper III
Using Power Query to extract the first occurring number from a string (URL)
I have a coumn with URLs from which I would like to extract the first occuring number. My constraints: the numbers don't occurre at the same position there might be some numbers further in the str...
- 3 years ago
Text.Combine(List.FirstN( List.Select( Text.Split(Text.Select( [Column1],{"0".."9","/"}),"/"),(x)=>x<>""),1))
julienvdc
3 years agoHelper III
Here is an example.
My column would have URLs as such:
/questions/11928/qwertyuio-asdfghj-34.html
/questions/7229/can-you-share-your-experience-in-developing-a-trai.html?childToView=8665#answer-8665
/articles/11867/jhbvcfgtyujn-4.html
/idea/11875/kjhgukjnk.html
/content/idea/234/kjhgukjnk.html
/content/articles/888383/jhbvcfgtyujn-4.html
The extract would be as such:
11928
7229
11867
11875
234
888383