Regex modify the article format: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=== Purpose === Convert the paragraph from: 1) ... to 1. ... original paragraph: <pre> 1) ... 2) ... </pre> to: <pre> 1. ... 2. ... </pre> === Approach === After enabled...") |
(No difference)
|
Revision as of 11:25, 9 March 2023
Purpose
Convert the paragraph from: 1) ... to 1. ...
original paragraph:
1) ... 2) ...
to:
1. ... 2. ...
Approach
After enabled the regular expression of the text editor such as Notepad++ or Sublime Text $
- Find: \s?(\d+)(\))\s+
- Replace with: \n$1\.\s
Example data
1) Generation Alpha is digitally-orientated and informed, leading to increased brand loyalty and consumer alertness. 2) Mental wellbeing is a key factor in consumer decision making and a disrupted lifecycle pattern will influence consumption habits. 3) Resource scarcity, health and sustainability are key factors for the future of consumption.