I am new to regex if this is indeed what I need.
The string might include :
[name* your-name ]
[email* your-main-email some_thing]
etc
Amateur logic :
- Search string for '['
- get substring between this and next ']'
- extract hyphenated word (probably find first word between first and next space)
- Replace substring with hyphenated word
- Repeat with all remaining tags
To hopefully produce :
[your-name]
[your-main-email]
etc
Or am I off target with method?
Many thanks