Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?<=(?:[?&]))foo(?:=([^&#]+))?\b
"
g

Description

A solution for capture set/unset/catch a value of param query of URLs.

Here is a example code that applies this pattern in JS, but JS doesn't have support to lookbehind.

Submitted by Rafael Laurindo - 8 years ago