regexr
regexr copied to clipboard
add a copy button to copy expression
Hi,
Before I would like to thank you for this super useful website, i use it frequently and one feature that I'm missing is : a copy button !
because each time we want to copy an expression we have to then write / before and /g or /gi or whatever after
So, this PR add a copy expression button :
https://user-images.githubusercontent.com/66263633/181645943-e0309593-5616-4266-86cd-0fb8d1f25ec8.mp4
336858233118761/add_button_to_copy_expression.mp4)
i would love to see a feature like this !
Thanks for the PR! Apologies for the delay in responding.
A couple notes:
- We have fairly limited space in those headers when running at minimum width, so I'd reduce it to just an icon, or maybe an icon + "Copy".
- If this is going to be added, I think it needs to be in a language agnostic way. This is actually part of what prevented me adding this before. Here's a sketch of one way I could see that working — it's a little bit cludgy, but workable. Totally open to other ideas too.

Thank you for the reply !
I totally understand the the need to suggest more specific options for every uses cases and languages, I am currently on a project but I edit the PR asap and I'll make those change !
And of course I understand the size constraints and I will take them into account when submitting an update.