This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

How to detect this char ?

Old posts that have not been replied to for several years.
Locked
k
kapot

Post by kapot »

Anyone know what is the code for [ ] { } ?

Like we know that 02 is BOLD ...

If I want to catch BOLD .. then I can use [string match *02* $s]

I think if we know the code for [ then we can catch [ easily .... or any other suggestion?
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

uhh, [string match *[* $string] maybe?
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

ohh, and if you really wanna do it the awkward way, the ascii number for [ is 91 (decimal). Don't forget that numeric escape sequences are in octal though... :razz:
Locked