Hi,below regex is working correctly in regex online tester and not in uipath studio.
My scope is to extract all lines between BONE PROFILE and next immediate Capital heading (i.e: BONE PROFILE to CBC). This CBC is dynamic
Regex:
BONE PROFILE((?!(^\b[A-Z\s]+$\b))[\s\S])*(^\b[A-Z\s]+$\b)
I have assigned this regex string to a variable “CommentRegex” and the below input string to a variable"SplittedText"
regex.match(SplittedText,CommentRegex,System.Text.RegularExpressions.RegexOptions.Multiline)
String:
Report 1/20
Patient name: MR John John Hospital Number: A Sex: Male
Date of birth: 01 Sep 1800 NHS number: 123 456 7890
Address: 742 Evergreen Terrace
Reported Specialty Location Clinician
31 Nov 2019 10:54 Blood Sciences MEDEFER Dr. Julius M. Hibbert (MEDEFER) (Gastroenterology)
Unwell ?cause
Sample A (Blood) Collected 31 Nov 2019 09:09 Received 31 Nov 2019 09:47
AUTOIMMUNE LIVER SCREEN
Gastric parietal cell abs Pending
Mitochondrial abs (AMA) Pending
Smooth muscle abs Pending
Liver kidney microsomal abs Pending
AST
AST * 43 U/L 0 - 35
BONE PROFILE
Total Alkaline Phosphatase 70 U/L 30 - 130
Calcium 2.32 mmol/L
Phosphate * 0.65 mmol/L 0.8 - 1.5
Albumin 42 g/L 35 - 50
Adjusted Calcium 2.33 mmol/L 2.20 - 2.60
CBC
Haemoglobin 166 g/L 130 - 170
White Cell Count 6.7 x10ˆ9/L 4 - 10
Platelet Count 194 x10ˆ9/L 150 - 410
Red Cell Count 5.47 x10ˆ12/L 4.5 - 5.5
Haematocrit 0.498 L/L 0.4 - 0.50
MCV 91 fL 83 - 101
MCH 30.3 pg 27 - 32
MCHC 333 g/L 315 - 345
Neutrophils 4.1 x10ˆ9/L 2.0 - 7.0
Lymphocytes 1.5 x10ˆ9/L 1 - 3.0
Monocytes 0.6 x10ˆ9/L 0.2 - 1.0
Eosinophils 0.5 x10ˆ9/L 0.0 - 0.5
Basophils 0.0 x10ˆ9/L 0.0 - 0.1
Nucleated RBC’s 0.0 x10ˆ9/L
LIVER FUNCTION TESTS
ALT * 55 U/L 0 - 45
Total Bilirubin 10 umol/L 0 - 21
UREA
Sodium 143 mmol/L 133 - 146
Potassium 4.1 mmol/L 3.5 - 5.3
Urea 4.6 mmol/L 2.5 - 7.8
Creatinine 87 umol/L 70 - 120
AKI Score
CALCIUM
https://icedesktop.notts-his.nhs.uk/icedesktop/dotnet/icedesktop/reporting/WardPrintL… 04/11/2019Reports For MEDEFER Page 2 of 18
Calcium 2.32 mmol/L
Albumin 42 g/L 35 - 50
Adjusted Calcium 2.33 mmol/L 2.20 - 2.60
EGFR BY EPI
eGFR by EPI/1.73m2 82 mL/min
GFR calculated by CKD-Epi formula (mL/min/1.73m2)
- for African-Caribbean multiply by 1.159. Not
valid in acute kidney injury, dialysis and
pregnancy. Please use Cockroft-Gault estimate
of creatinine clearance for drug dosing.
GGT ONLY
Gamma GT 34 U/L 0 - 60
IMMUNOGLOBULINS
Total Protein 74 g/L 60 - 80
Albumin 42 g/L 35 - 50
Protein electrophoresis Pending
AFP TUMOUR MARKER
New Alpha Fetoprotein 2 kU/L 0 - 5.8
ANTI TTG
TTG abs (IGA) Pending u/mL
TOTAL PROTEIN ONLY
Total Protein 74 g/L 60 - 80