OK, are you saying, that you DON'T know what the string is between the tags, and you want the string between the tags?

Cuz it sounds like you are saying find "this string" in a larger, and pull it, but why pull if you already know what it is? If you are looking for the string within the tags, it would be something like:

<@regex expr="(\[\[)(.+)(\]\])" str="This is a very long string and I have placed [[This is the string I want to get]] within the long string">

This will return an array of 3 rows. The second row should be what you are looking for. The expression says BASICALLY show me any number of characters (except newline) between [[ and ]]. Since the [] are used in regex, I escaped them.

--

Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/

On Oct 18, 2005, at 6:50 PM, MC Tay wrote:

Thanks Robert for your quick response.

The string that we want to get is the string within the tags (which are started with [[ and and ended with ]] ) that we embedded within the long text. We don't care the rest of it.

Can you show me the syntax for this by using the regex please? Thanks!

MC

At 06:41 PM 10/18/2005, you wrote:

regex is very fast for this kind of stuff, the question is how are
you searching?

What is the criteria? do you know the OTHER part of the string, and
want the rest?

--

Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/

On Oct 18, 2005, at 6:34 PM, MC Tay wrote:


Hi:

I am trying to use the string function to strip a certain section
of any string and couldn't find a best way to do it.

For example:

This is a very long string and I have placed [[This is the string I
want to get]] within the long string ..... bluh bluh bluh .....

How do I strip the long string and just get this [[This is the
string I want to get]]?

Can anyone help please? Thanks in advance.

MC

____________________________________________________________________ __ __
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf



_____________________________________________________________________ ___
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


______________________________________________________________________ __
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf



________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to