-
Knowledge Base Approver
The King of Overkill!
VBAX Master
Hey Patrick,
First off, short answer: nope, can't be done well. Sure, you could do something like
=RegExpFind(A1,"\w+\.\w+\.\w+",1)
But if a1 had a link like http://www.state.ny.us/ then you'd only be returning the www.state.ny
Also, if the link was http://msn.com/home.asp it would not return anything.
Also, FWIW, your current pattern could be:
=RegExpFind(A1,"//.+?/",1)
A couple characters shorter :P
Looks like its time for you to make a new function! One that includes submatches.. I'll let you program the logic (though I'll gladly help if you'd like), but one that allows you to use a formula like:
=RegExpFindSub(A1,"//(.+?)/",1,1)
As I said, let me know if you need/want any help with this!
Matt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules