Skip to content

URLPattern Regex Capture Groups #1199

Answered by gdh1995
arnold-c asked this question in Q&A
Discussion options

You must be logged in to vote
  1. The [ and ] just mean re= is optional.
  2. sorry currently the solution for your issue does exist but is very very tricky (I'll try improving it in v2.12-15 in several months):

So please try:

  1. add such a custom search engine
gmdir: vimium://sed/_gmdir\ https://www.google.com/maps/dir/$s{+} \
  https://www.google.com/maps/dir/ re=/^([\w+]+)\/([\w]+)/
  Google Maps Directions
  1. add "text substitution rules" into "Auto substitution of various text":
_gmdir@\+(:|%3A)\+@/@i,return
_gmdir@\+([^/+]+)$@/$1@

Explain:

  • the main search url is vimium://sed/<sed_key>\ <url>, which executes text substitions defined in Auto substitution of various text
  • the prefix and re= will be used by commands like s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arnold-c
Comment options

Answer selected by arnold-c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants