Regullar expresions how to exclude some symbols

I have a string:{HELLO_WORLD}&optid=541255b82bc957475c7b

I need 541255b82bc957475c7b6222d1a980a5 - (I want to extract click)/ I use next regex click=(.+?)& but it take &click=541255b82bc957475c7b6222d1a980a5& .

How I can extract without “click=” and “&”?

Just get group 1 from result.

1 Like

Or that: (?<=click=)(.+?)(?=&)

1 Like


1 Like

how i can get group 1 from reslt?

i need to use regex in postman

const $ = cheerio.load(pm.response.text())
var val1 = $(‘script’).text();
var val2 = val1.match("(?<=click=)([^&]+)")

pm.environment.set(’{transaction_id}’, val2)

i use that? but it is not working

var str = '{HELLO_WORLD}&optid=541255b82bc957475c7b';

var reg = /click=(\w+)&/


It’s another regex, that I have wrote. :slight_smile:

Максим, вы мой вариант из каких побуждений игнорируете?

Я??? :slight_smile: Вопрос не я задавал. :slight_smile: