anjasing
(Anjali)
1
Urgent>> Regex: Want to extract order number starting from Order Number/Order/order number ending with a number from an input text ?
Input Text 1:
Screenshots: **
Order Number: CT1234567
Rate Plan:
Output Needed1:
CT1234567
Input text2:
Screenshots: **
Order Number:
Rate Plan:
Output Needed:
Blank/nothing
ppr
(Peter Preuss)
2
which can be dynamized for the ending number
anjasing
(Anjali)
3
Could u plz help in customizing this?
(?<=(Order|ORDER|order)\s*(Number|number|NUMBER)(:|-|\s*)\s*)[A-Za-z0-9]+
I was using this one
ppr
(Peter Preuss)
4
given regex can be simplified by
- handling case insensitivity as option (-> also check regex options)
- and others
strPattern =
String.Format("(?i)(?<=Order\s*Number[:\-]\ *)[A-Za-z0-9]+{0}\b", strEndingNumberVar)
For regex learning
1 Like
system
(system)
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.