wisem2540 Posted June 19, 2015 Share Posted June 19, 2015 I struggle with this often. I am trying to return CAMPUS (not case sensitive) all the way up to the floor number. Either a SPACE or the end of the line should signify the end of what I am trying to capture. Any help would be appreciated CAMPUS:This-would be a Site Name,BUILDING:MOB 1,FLOOR:01 IP:10.11.12.13 Link to comment Share on other sites More sharing options...
iamtheky Posted June 19, 2015 Share Posted June 19, 2015 (edited) $sString = "CAMPUS:This-would be a Site Name,BUILDING:MOB 1,FLOOR:01 IP:10.11.12.13" msgbox(0, '' , stringregexp($sString , "(.*FLOOR:.*)\sIP" , 3)[0])may have to change the stuff outside the capture to just a whitespace (\s), if IP is not always next.but then if the strings are all formatted that exact way you could just take everything up to IPmsgbox(0, '' , stringregexp($sString , "(.*)\sIP" , 3)[0]) Edited June 19, 2015 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now