barryb Posted January 8, 2009 Posted January 8, 2009 (edited) Hi,This is probably going to be easy to answer, but I can't figure it out. My script quite happily uses _StringBetween to do a search and replace,$aArray = _StringBetween($sText, $start, $end)but I have an issue where I need to extend what is being replaced in the search and replace. My current search and replace parameters happily identifies and replaces the different www.example.com entries with $end = "/" but I need to expand it to also replace text to the second "/" such as URL /TextToReplace/ but the TextToReplace can be different e.g.www.example.com/TextoToReplace/DontReplacewww.example.com/ABC/DontReplacewww.example2.com/DEF/DontReplacewww.example3.com/GHI/DontReplaceI tried wildcard but that didn't work as it is taken as a literal character. Any help appreciated Thanks,Barry Edited January 8, 2009 by barryb
barryb Posted January 8, 2009 Author Posted January 8, 2009 Hi, Think I worked it out myself, I created another search array to find and replace against the tail end of .com/ and / and that appears to have worked $bArray = _StringBetween($sText, $start2, $end2) will need to do far more testing though!! Cheers, Barry
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