firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.2k stars 198 forks source link

Option Button Copied to Clipboard #2196

Closed PaltryProgrammer closed 6 months ago

PaltryProgrammer commented 6 months ago

Bug Description

option button copied to clipboard

Reproduction steps

please see attached GIF

Expected Outcome

only regex pattern copied to clipboard

Browser

Microsoft Edge Version 120.0.2210.91 (Official build) (64-bit)

OS

Include OS name and version Option Button Copied to Clipboard Microsoft Windows 10 Professional (x64) Build 19045.3803 (22H2)

working-name commented 6 months ago

Hello!

What was the expectation? That the delimiters and flags would not be copied?

PaltryProgrammer commented 6 months ago

yes. only regex pattern copied . as for delimiters i am not certain as i do not know their use / purpose . my intention is to copy into my C++ / AWK / Visual Studio Find/Replace the necessary pattern for use therein . thank you kindly

working-name commented 6 months ago

Gotcha. The purpose of delimiters is to delineate where a regex begins and where it ends. Inside the regex itself, if you use a delimiter you'll have to escape it in a way that's appropriate for both regex and the overlying programming language. As far as the flags, those are instructions to the regex engine. For example /g means don't stop after you find the first match, find all of them.

For the software you use these delimiters and flags are abstracted for you in the UI. However, when you use C++ and AWK both delimiters and flags are important.

PaltryProgrammer commented 6 months ago

thank you for your kind assistance .