Skip to main content
Question

proper use of regular expression

  • November 9, 2021
  • 1 reply
  • 29 views

hanskoudijs
Forum|alt.badge.img

From html-text "<a alt="Molen (molenromp) information" href="/monument/53454/molen-molenromp/plaats/">" I want to grep the "/monument/53454/molen-molenromp/plaats/"-part. Therefore I use @SubstringRegularExpression("<a alt="Molen (molenromp) information" href="/monument/53454/molen-molenromp/plaats/","\\/([a-z0-9/-])*",0,0,1,caseSensitive=TRUE) but this only returns "/53454/molen-molenromp/plaats/" (so looses the first part /monument).

According the very usefull site https://regexr.com/ the reg. expr. "([a-z0-9/-])*" on "<a alt="Molen (molenromp) information" href="/monument/53454/molen-molenromp/plaats/">" though results in "/monument/53454/molen-molenromp/plaats/". What do I do wrong? Attached a workbench with the conversion.

1 reply

redgeographics
Celebrity
Forum|alt.badge.img+50

It might be a different regex parser being used, that particular regex does seem to give the right result if you use it in a StringSearcher


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings