regex for (data-*) attributes

Created on 26 September 2023, about 1 year ago
Updated 1 July 2024, 5 months ago

I'm trying to remove all the data attributes from elements. This regular expression is suppose to find any data attributes and remove them:

Search expression
(<[^>]*) (data-(\S+)=\"((?:\\.|[^"\\])*)")
Replacement
$1

I'm also testing the regular expression on the RegEx101 site.

After adding this regular expressions it still doesn't remove the data attribute.

πŸ’¬ Support request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States acemichael

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024