Solved Using Regex to capture variable

RReed

New Member
Hi all,

I'm having a bit of difficulty trying to get a certain regex expression to work properly. I have one part of the pattern figured out. I was able to find something online for one part of the expression of what I am trying to do but I am still rather new to using Regex in general and am getting stumped on how to execute or have Regex capture the other variable I am trying to get.

In my data, I am trying to pull numbers and at times "Nil" from the variable. While I have the expression which will help me capture if any numbers are present from the data, the part which is stumping me on how to also capture "Nil" is where I am stuck at.

Any help on this would greatly be appreciated! I've attached a sample picture of how the regex is right now.
 

Attachments

  • Sample.jpg
    Sample.jpg
    20.3 KB · Views: 8

sahil_raina_91

Active Member
Hi all,

I'm having a bit of difficulty trying to get a certain regex expression to work properly. I have one part of the pattern figured out. I was able to find something online for one part of the expression of what I am trying to do but I am still rather new to using Regex in general and am getting stumped on how to execute or have Regex capture the other variable I am trying to get.

In my data, I am trying to pull numbers and at times "Nil" from the variable. While I have the expression which will help me capture if any numbers are present from the data, the part which is stumping me on how to also capture "Nil" is where I am stuck at.

Any help on this would greatly be appreciated! I've attached a sample picture of how the regex is right now.
If you are validating either numbers or uppercase NIL = (\d+.\d+)|(NIL)
 
Top