dmbfan 9 Posted February 6, 2013 Report Share Posted February 6, 2013 I have a very basic understanding of regex and have used it in alot of my bots, but I am totally stuck. I have scraped this text from a page into a variable: Feb 05, 2013 05:20 PM Medical CenterChief ComplaintAttending PhysicianDischarge DispositionDischarge DateInsuranceOJ BOLE HEALTHCARE 1000171 I am trying to pull in everything after Insurance (and will then separate the name of the health plan and the number separately) I figured I would just set a variable {Insurance Info} using Insurance.* as the Regex to grab everything. Then Replace Insurance in {Insurance Info} with $nothing Set a variable for the {Insurance number} by doing a find by regular expression [0-9]* on {Insurance Info} And then create an {Insurance Name} variable by doing a find replace on {Insurance Info} and replacing {Insurance Number} with nothing. The problem I am having with this is the first regex Insurance.* only grabs Insurance and not all the characters after it. I am guessing this has to do with the ine break and after much googling, I just can't figure it out. Does anyone have any ideas of what the initial expression needs to be to grab everything? Quote Link to post Share on other sites
dmbfan 9 Posted February 6, 2013 Author Report Share Posted February 6, 2013 It never fails... I post a question after hours of searching and then find the answer! Insurance\s\S.* does the trick because .* alone does not capture line breaks! I learn something new using uBot every day. Quote Link to post Share on other sites
AutomationNinja 194 Posted February 6, 2013 Report Share Posted February 6, 2013 Nice! That didn't take you long. I always do that myself - post a question and then 5 seconds later I figure it out. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.