× Here you can get community support related to ReDJ.

{preg match -1} ?

  • ppeer
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 10 months ago - 9 years 10 months ago #2601 by ppeer
{preg match -1} ? was created by ppeer
Ha Luigi,

example.com/play//

Normally we define a placeholder like for example:
icat={preg_match 1}/\/play\/([^\/]+)\/([^\/]+)/{/preg_match}

but is it also possible to define a variable (icat) when it is positioned before ^/play/ instead of after?
Something like:
example.com/<icat>/play/<icategory>
icat={preg_match -1}/([^\/]+)\/([^\/]+)/\/play\//{/preg_match}

regards
Peter
Last edit: 9 years 10 months ago by ppeer.

Please Log in or Create an account to join the conversation.

  • ppeer
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 10 months ago #2602 by ppeer
Replied by ppeer on topic {preg match -1} ?
solved it by starting from the left point of the url to the right, instead of working from the /page/ part to the left.

{preg_match 1}/\/{siteurl}\/([^\/]+)/{/preg_match} (takes out the first part after the domain which was what I needed).

regards
Peter

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #2609 by admin
Replied by admin on topic {preg match -1} ?
Hi Peter,
it is a pleasure when the problems clear up by themselves :)

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.139 seconds