javascript - Simple URL query parse and re-direct -


i'm looking doing think should pretty simple in javascript. have query string in format of 9sjn25-30-10 want able pass 1 url (e.g., www.example.com/?q=9sjn25-30-10. want able automatically parse url , re-direct url in following format: www.domain.com/journal/year9/issue25/article30/page10/ numbers pulled query string , inserted shown in previous example.

it nice if re-direct script disallow characters or symbols other letters, numbers, , dashes , display error message if input query not strictly in format of #sjn#-#-# (with # representing number 1 or more digits long , letters sjn hardcoded).

any appreciated!


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -