Answer the question
In order to leave comments, you need to log in
Regular expression to search for key-value pairs?
You need to get the result:
Weight: About 17 lbs
Color: Black
Load capacity: 263 lbs
Tested for: 120-150 kg (263-330 lbs) dynamic state
etc
from the line:
Weight: About 17 lbs Color: Black Load capacity: 263 lbs Tested for: 120-150 kg (263-330 lbs) dynamic state Overall dimension: 22.5" x 21.5" x 35"- 39" (L x W x H) Backrest size:17.5" x 19" Seat size:17.5" x 17.5 " Adjustable chair seat: 18"-22"
As I understand one pair: [a word with a capital letter (or a word with a capital letter and several with a small one)][:][something up to the next key of the same type:]
Got the keys so far, regex:
[AZ][az]*(\s[az]*)*[:]
How to get all key-value matches?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question