PDA

View Full Version : Search memo for quoted material


ABC123

Steve Bovino
02-22-2007, 09:03 AM
Any suggestions on the most efficient way to search and extract quoted strings from memo fields? For example, I want to search a memo field and extract the following:Function("this is the end"). I was experimenting in the interactive window and the quotes were playing havoc with many of the functions. I was looking at A5_extract_advance which seems to be what I want. In my small string exmaple I was able to insert the backslash to deal with the quotes. How would that be handled when searching an entire memo field that may have a number of quoted strings? Thanks for any suggestions.

Steve

Marcel Kollenaar
02-22-2007, 09:15 AM
Steve, look at the StringScanner object and its methods.

Steve Bovino
02-22-2007, 05:41 PM
Marcel:

Thanks for the tip. That helped me reduce the text that I want down to this

"example". I cannot figure out any method that will replace the " with nothing.

Steve

Stan Mathews
02-22-2007, 05:51 PM
Marcel:

Thanks for the tip. That helped me reduce the text that I want down to this

"example". I cannot figure out any method that will replace the " with nothing.

Steve

Did you try searching and replacing

chr(34) with chr(0)?

Steve Bovino
02-22-2007, 06:13 PM
Marcel:

I must be up too long. I used right(), left() and len() and eliminated the quotes.

Thanks,

Steve

Steve Bovino
02-22-2007, 06:39 PM
Stan:

That worked as well. Thanks,

Steve

Marcel Kollenaar
02-23-2007, 06:55 AM
Sorry for responding late. I see Stan helped you :)

I tried to figure out how to follow posts and threads but I haven't. Sometimes I see a button follow/subscribe this thread and another time it is absent. Don't know why, it must be me.

Have to read the help again.