Cannot Get My Multiple Regex Working For Specific Case In URL Structure
I am trying to match regex for my URL structures below:
SPECIFIC CASE #1: http://www.example.com/webapp/some-text.html http://www.example.com/webapp/some-text-a1.html http://www.example.com/webapp/some-a2-text.html SPECIFIC CASE #2: http://www.example.com/webapp/first-text-vs-some-text.html http://www.example.com/webapp/first-text-a1-vs-sec-b2-text.html http://www.example.com/webapp/first-text-a1-vs-sec-b2-text-vs-third-c3-text.html http://www.example.com/webapp/some-text-a1-vs-sec-text-b2-vs-third-text-vs-last-text-c1.html SPECIFIC CASE #3: http://www.example.com/webapp/sub-app/some-text-a1.html
My regex is:
SPECIFIC CASE #1: \/webapp\/(.*)\.html SPECIFIC CASE #3: \/webapp\/sub-app\/(.*)\.html
Case #1 and #3 working. But for #2 it maches all including #1.
The thing is that my Web application is structured so If I visit the above example links some work and other gives me error 404.
I think my regex is wrong because I have multiple cases for that. Currently it is only working for specific case #1.
My guess is that my regex from above is not good for that. Do I need multuple regexes for that? Which one?
Is there a way for regex to check if value "vs" exists (one or multiple times) inside the given URL?
Any ideas or better solutions exist?
Any help would be appreciated!
Thanks a lot!
How about this regex:
This regex matches any repetitive
-vs-.* once or more.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?