[Solved] How to extract query string values using a regex? January 18, 2023 by Kirat Maybe this: ((?<=voyageCode=)[^=&\s]+)|((?<=portid=)[^=&\s]+) Regex live here. 1 solved How to extract query string values using a regex?