Regex - Extract digits from a url

Welcome to the Make community!

You can use a Text Parser “Match Pattern” module with this regular expression pattern

[?&]userid=(?<usuarioid>[\d]+)

Regex test: https://regex101.com/r/E43OZh

Using a “Named Capture Group” will directly output your capture as a named variable, so you don’t have to use another “Set variable” module to set the name of the variable.


For more information, see Text Parser in the Make Help Center:

Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.

Hope this helps!


Links

Here are some useful links and guides to help you get started and learn more on how to use the Make platform, apps, and app modules —

General

Help Center Basics

Articles & Videos

3 Likes