× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2011-02-27 11:28, David Gibbs wrote:
On 2/27/2011 10:10 AM, Pete Hall wrote:
Isn't '|' a regex operator?

Have you tried escaping the |? ("\|")

Yeah, tried that. It throws an exception if I ignore the editor error:
Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\).

I see what the problem is ... you need to escape the escaping ... the regex you should use to split is "\\|".

Check out http://code.midrange.com/9a65cca921.html for an example of correctly splitting the string.

david

Thanks David.

- --
Pete Hall
pete@xxxxxxxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1qzfgACgkQXczQcKdXKg7ShACgu7l2invBNlNkyE4S4sUTsarX
p50AniW/GcT1JDzNr25M5EkEEtoYfj0D
=v3x4
-----END PGP SIGNATURE-----

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.