Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Get Parenthesis function

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 14th Jan 2007 20:31
I've used this function alot in my recent scripting systems. I find it usefull so I thought I'd just post it here.



There's also a 'mid' function which is uses. It's just like 'mid$' but for multiple letters.

So, if you have a line like this...

...the function would retrieve everything inside the brackets. But that's just a crappy example.

If you have this...

...you can call the function like this:


and blockk$ would be "hello". If you passed "blk3" to it, it would return "world". If you passed "blk1" to it, it would return "blk2{hello} blk3{world}"

Enjoy

Login to post a reply

Server time is: 2024-11-23 00:32:33
Your offset time is: 2024-11-23 00:32:33