Hello. The site used the regulars for the url of the form http://domen.com/themename/pagename.html

For pagename, the regular form ([a-z0-9 \ - /] +) was used. It was assumed that pagename will consist of English letters, numbers, a dash, maybe a slash. However, now it is necessary to rewrite it with the assumption that pagename can be in any language of the world - English, Russian, French, Spanish, etc. Tell me how best to make a regular expression. PHP version on server 5.6.24

  • I do not know how to PCP, but in general here is a regular schedule for parsing URI into parts. - avp
  • And what should this expression do? Find links in longer text? What have you tried? - Wiktor Stribiżew
  • ru.stackoverflow.com/questions/542842/… In the first regular season, delete (?<!href=[\'"]) and (?![^<]*+</a>) and get the required regular schedule - Visman

1 answer 1

If your regular season does not suit you only because it does not support languages, then this one will suit you ([\pL_0-9\-/]+)