I need to extract the Last KH behind the Numbers, and the Numbers behind the PH, could you tell me how to write code, find didn't find the entire network to extract keywords specified content of the tutorial, the regular expression is so hard...
CodePudding user response:
S="'
The Last KH: 7.10 PH: 8.41 & lt; Br> CKI=240 NT relationship: 147 Min W: 191 AutoMode: 1
The import re M=re match (r '. * Last KH:. * (\ d + \ \ d +). The pH: *. * (\ d + \ \ d +). * ', s, flags.=re DOTALL) Print (m.g roup (1)) Print (m.g roup (2))