|
Prev: Marshalling: GCHandle Pinning vs Marshal.PtrToStruct & StructToPtr?
Next: VB code to print pdf file
From: Freddy Coal on 2 Jul 2008 19:26 Hi, I would like make a search and replace in a file, for that I need get the text in a textbox, but I need recognyze literally characters of the user like a commands, for example: The chain of the user is: "Hello world" & chr(64) & vbcrlf If I capture the textbox, I get: ""Hello world" & chr(64) & vbcrlf" But I would like get the string: "Hello world@" & vbcrlf How make that?. Thanks in advance. Freddy Coal
From: Cor Ligthert[MVP] on 3 Jul 2008 00:35 Freddy, Be aware that this sample goes only about char which have an integer code from 10 to 99 the rest you may to do yourself. \\\ 'assuming that you have first replaced your internal single quote by a double quote, I assume it goes autmaticly but I did not test that. Dim theString = "Hello world"" & Chr(64) & vbCrLf" Dim charStart = theString.IndexOf("Chr") Dim toUseChar = Chr(CInt(theString.Substring((charStart + 4), 2))) Dim placeStart = theString.IndexOf("""") theString = theString.Substring(0, placeStart) & toUseChar /// Cor "Freddy Coal" <freddycoal(a)gmaiwithoutspam.com> schreef in bericht news:ehZ4frJ3IHA.5024(a)TK2MSFTNGP03.phx.gbl... > Hi, I would like make a search and replace in a file, for that I need get > the text in a textbox, but I need recognyze literally characters of the > user like a commands, for example: > > The chain of the user is: "Hello world" & chr(64) & vbcrlf > > If I capture the textbox, I get: ""Hello world" & chr(64) & vbcrlf" > > But I would like get the string: "Hello world@" & vbcrlf > > How make that?. > > Thanks in advance. > > Freddy Coal >
From: SurturZ on 3 Jul 2008 00:37 You'll need to write a parser, or use a series of regexes or something like that. -- David Streeter Synchrotech Software Sydney Australia "Freddy Coal" wrote: > Hi, I would like make a search and replace in a file, for that I need get > the text in a textbox, but I need recognyze literally characters of the user > like a commands, for example: > > The chain of the user is: "Hello world" & chr(64) & vbcrlf > > If I capture the textbox, I get: ""Hello world" & chr(64) & vbcrlf" > > But I would like get the string: "Hello world@" & vbcrlf > > How make that?. > > Thanks in advance. > > Freddy Coal > > >
From: Patrice on 3 Jul 2008 03:54 Usually advanced search/replace capabilities are using regular expressions rather than a VB Like syntax. See for example the search/replace included in VS (and it allows much more powerfull scenarios)... -- Patrice "Freddy Coal" <freddycoal(a)gmaiwithoutspam.com> a �crit dans le message de groupe de discussion : ehZ4frJ3IHA.5024(a)TK2MSFTNGP03.phx.gbl... > Hi, I would like make a search and replace in a file, for that I need get > the text in a textbox, but I need recognyze literally characters of the > user like a commands, for example: > > The chain of the user is: "Hello world" & chr(64) & vbcrlf > > If I capture the textbox, I get: ""Hello world" & chr(64) & vbcrlf" > > But I would like get the string: "Hello world@" & vbcrlf > > How make that?. > > Thanks in advance. > > Freddy Coal >
From: Cor Ligthert [MVP] on 3 Jul 2008 06:28 Patrice, Maybe you can make a little sample like I did for this problem, using string methods. Be aware that any regular expression is very much slower then any direct method as you don't need more than 10 methods. Cor "Patrice" <http://www.chez.com/scribe/> schreef in bericht news:eUdwQIO3IHA.3544(a)TK2MSFTNGP05.phx.gbl... > Usually advanced search/replace capabilities are using regular expressions > rather than a VB Like syntax. See for example the search/replace included > in VS (and it allows much more powerfull scenarios)... > > > -- > Patrice > > > "Freddy Coal" <freddycoal(a)gmaiwithoutspam.com> a �crit dans le message de > groupe de discussion : ehZ4frJ3IHA.5024(a)TK2MSFTNGP03.phx.gbl... >> Hi, I would like make a search and replace in a file, for that I need get >> the text in a textbox, but I need recognyze literally characters of the >> user like a commands, for example: >> >> The chain of the user is: "Hello world" & chr(64) & vbcrlf >> >> If I capture the textbox, I get: ""Hello world" & chr(64) & vbcrlf" >> >> But I would like get the string: "Hello world@" & vbcrlf >> >> How make that?. >> >> Thanks in advance. >> >> Freddy Coal >> >
|
Next
|
Last
Pages: 1 2 Prev: Marshalling: GCHandle Pinning vs Marshal.PtrToStruct & StructToPtr? Next: VB code to print pdf file |