I am working on a project where i need to grab some text and the only option available to do this is through regex. If anyone here can help, then please let me know what would be the correct command/syntax to capture the file number from the below URL.
https://k.nooncdn.com/t_desktop-pdp-v1/v1589276842/N14058677A_1.jpg
In this case the text i wish to capture us "N14058677A".
Thanks! TM
You can use:
.{10}(?=_1.jpg)Notice that it will work only if the name of the file ends with
"_1.jpg"and will take the 10 characters that came before. In order, to improve the formula, more examples are needed.Or
If it always starts with an "N", got 8 numbers and ends with an "A"