dbTalk Databases Forums  

searching a TAB or CR or ascii code in text ?

comp.databases.filemaker comp.databases.filemaker


Discuss searching a TAB or CR or ascii code in text ? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jean-Jacques Boutaud
 
Posts: n/a

Default searching a TAB or CR or ascii code in text ? - 08-08-2005 , 01:47 AM






Hi all,
Using FMPro 6.04/Mac OS X, I'm trying to replace some chars like TAB
(\x09) or anything I can't type. Using the (french name of function)
REMPLACE2("StringToChange"; "ReplaceBy"; "LookFor"), how can I type
something like :
REMPLACE2("MyString"; "ascii code of tab"; "Tabulation here")
TIA
--
JJBee
Président à vie du G.R.O.I.N.
Secrétaire général : AluBook

Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: searching a TAB or CR or ascii code in text ? - 08-08-2005 , 02:28 AM






A way to solve the problem is to create a special global field and to
paste into it a special character written into a Word document and use
"Substitute" (this is the term for "Remplace2").
Better you may have a special Param.fp5 file with only one record and
make a normal field into which you'll pour the Word special
character.Then with a Constant = 1 relationship any other file of the
solution will be able to access it.
Remi-Noel

"Jean-Jacques Boutaud" <jjboutaud (AT) free (DOT) fr> a écrit dans le message de
news: 1h0yvsg.ycgvt2q0rskoN%jjboutaud (AT) free (DOT) fr...
Quote:
Hi all,
Using FMPro 6.04/Mac OS X, I'm trying to replace some chars like TAB
(\x09) or anything I can't type. Using the (french name of function)
REMPLACE2("StringToChange"; "ReplaceBy"; "LookFor"), how can I type
something like :
REMPLACE2("MyString"; "ascii code of tab"; "Tabulation here")
TIA
--
JJBee
Président à vie du G.R.O.I.N.
Secrétaire général : AluBook



Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: searching a TAB or CR or ascii code in text ? - 08-08-2005 , 02:46 AM



In article <1h0yvsg.ycgvt2q0rskoN%jjboutaud (AT) free (DOT) fr>, jjboutaud (AT) free (DOT) fr
(Jean-Jacques Boutaud) wrote:

Quote:
Hi all,
Using FMPro 6.04/Mac OS X, I'm trying to replace some chars like TAB
(\x09) or anything I can't type. Using the (french name of function)
REMPLACE2("StringToChange"; "ReplaceBy"; "LookFor"), how can I type
something like :
REMPLACE2("MyString"; "ascii code of tab"; "Tabulation here")
TIA
There's two ways to replace characters that can't be typed easily.

A. Before using the Remplace command, type the character into
a normal Text field, then select and Copy it. Then go to
the Remplace command and Paste the character in the
appropriate place.

B. Create a new Global field (eg. g_Tab) and temporarily put
it on a layout so you can type in the character. Then use
that Global field wherever you need that character.
ie.
Remaplce ("StringToChange", "g_Tab", "ASCIICode")


Note:
I think you've got your "LookFor" and "ReplaceBy" around the wrong way.
The English version of the command is

Substitute (text, search*string, replace*string)




Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #4  
Old   
Jean-Jacques Boutaud
 
Posts: n/a

Default Re: searching a TAB or CR or ascii code in text ? - 08-12-2005 , 05:45 AM



Remi-Noel Menegaux <rnmenegaux (AT) free (DOT) fr> wrote:

Quote:
A way to solve the problem is to create a special global field and to
paste into it a special character written into a Word document and use
"Substitute" (this is the term for "Remplace2").
Better you may have a special Param.fp5 file with only one record and
make a normal field into which you'll pour the Word special
character.Then with a Constant = 1 relationship any other file of the
solution will be able to access it.
Remi-Noel

"Jean-Jacques Boutaud" <jjboutaud (AT) free (DOT) fr> a écrit dans le message de
news: 1h0yvsg.ycgvt2q0rskoN%jjboutaud (AT) free (DOT) fr...
Hi all,
Using FMPro 6.04/Mac OS X, I'm trying to replace some chars like TAB
(\x09) or anything I can't type. Using the (french name of function)
REMPLACE2("StringToChange"; "ReplaceBy"; "LookFor"), how can I type
something like :
REMPLACE2("MyString"; "ascii code of tab"; "Tabulation here")
TIA
--
JJBee
Président à vie du G.R.O.I.N.
Secrétaire général : AluBook
Many thanks to you (merci beaucoup en quelque sorte ;^) and sorry for my
delayed reply.

The main purpose is :
- to export some records adding XTags for XPress (like paragraphe style
names and other...). Some chars from FMPro fields cause problems in
XPress ; the new line (\x0B) for exemple is the XTag to jump to next
block in XPress so I have to change it to <\n> but as there is a button
for it in the text operators, there is no problem. The Tabulation char
is automatically changed to the space char (\x20) as I export these
records to a .tab file.
So, it seems that this is not the nightmare I imagined ;^)

--
JJBee
Président à vie du G.R.O.I.N.
Secrétaire général : AluBook


Reply With Quote
  #5  
Old   
Jean-Jacques Boutaud
 
Posts: n/a

Default Re: searching a TAB or CR or ascii code in text ? - 08-12-2005 , 05:45 AM



Helpful Harry <helpful_harry (AT) nom (DOT) de.plume.com> wrote:

Quote:
In article <1h0yvsg.ycgvt2q0rskoN%jjboutaud (AT) free (DOT) fr>, jjboutaud (AT) free (DOT) fr
(Jean-Jacques Boutaud) wrote:

Hi all,
Using FMPro 6.04/Mac OS X, I'm trying to replace some chars like TAB
(\x09) or anything I can't type. Using the (french name of function)
REMPLACE2("StringToChange"; "ReplaceBy"; "LookFor"), how can I type
something like :
REMPLACE2("MyString"; "ascii code of tab"; "Tabulation here")
TIA

There's two ways to replace characters that can't be typed easily.

A. Before using the Remplace command, type the character into
a normal Text field, then select and Copy it. Then go to
the Remplace command and Paste the character in the
appropriate place.

B. Create a new Global field (eg. g_Tab) and temporarily put
it on a layout so you can type in the character. Then use
that Global field wherever you need that character.
ie.
Remaplce ("StringToChange", "g_Tab", "ASCIICode")


Note:
I think you've got your "LookFor" and "ReplaceBy" around the wrong way.
The English version of the command is

Substitute (text, search string, replace string)




Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
Many thanks to you and sorry for my delayed reply.

The main purpose is :
- to export some records adding XTags for XPress (like paragraphe style
names and other...). Some chars from FMPro fields cause problems in
XPress ; the new line (\x0B) for example is the XTag to jump to next
block in XPress so I have to change it to <\n> but as there is a button
for it in the text operators buttons from the calculation window, there
is no problem. The Tabulation char is automatically converted to the
space char (\x20) as I export these records to a .tab file.
So, it seems that this is not the nightmare I imagined ;^)
Yet, it's a "pity" that there is no way to type in some chars in a way
like \x09 for exemple.
And you are right, I invert the last two parameters of the Substitute
command.
One more time, many thanks.

--
JJBee
Président à vie du G.R.O.I.N.
Secrétaire général : AluBook


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.