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.
Old posts that have not been replied to for several years.
-
bazn
- Voice
- Posts: 12
- Joined: Sun Jul 04, 2004 11:55 am
Post
by bazn »
hi i'm trying to skip characters wihcih mysql doesn't like tryed like that :
Code: Select all
regsub -all {[\^\[\]\'\"\# ]} $row " " row
but it don't work, it gives me no failure but it doesnt remove the characters
^ \ ' " #
someone can give me a hint?
pz
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
try:
Code: Select all
set row [string map {^ "" \\ "" ' "" \" "" # ""} $row]
-
Ofloo
- Owner
- Posts: 953
- Joined: Tue May 13, 2003 1:37 am
- Location: Belguim
-
Contact:
Post
by Ofloo »
what about a '.' and '`' ...
XplaiN but think of me as stupid
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
He asked about stripping "
^ \ ' " #". however if
` and
. should be skipped too then this will do it:
Code: Select all
set row [string map {^ "" \\ "" ' "" \" "" # "" . "" ` ""} $row]
-
Ofloo
- Owner
- Posts: 953
- Joined: Tue May 13, 2003 1:37 am
- Location: Belguim
-
Contact:
Post
by Ofloo »
just trying to point out that he might wana skip those to
cause he wants to strip out special chars eh ..
XplaiN but think of me as stupid