Jump to content
Salesforce and other SMB Solutions are coming soon. ×

parse escape codes


Recommended Posts

PI 387802
×Brassicoraphanus spp.
from Former Soviet Union


The past few days I've been working on getting my database to import a text file consisting of lines of text like that above (it's a listing of seed available from the USDA) into a table which uses calculation fields to parse out the various bits of information, which I can then display in a layout. I use the following calcuation to get the Latin binomial from each record:


Let ( [


begin = Position ( String ; ">" ; 1 ; 5 ) + 1 ;


end = Position ( String ; "


length_link = end - begin






Middle ( String ; begin ; length_link ) )



Which works fine except in the case of records like the example above, which include an escape code for the times symbol (x). The record above is for seed from a cross and so the genus should appear as x Brassicoraphanus.


Is there a way to 1: get the calculation to ignore the escape code or 2: get it to interpret it as the times symbol, or just replace it with an "x"?

Link to comment
Share on other sites

I'm way too HTML-ignorant to know what of the above alphanumeric peasoup is the escape code. But if it's a consistent string that would not appear anywhere else, yeah, you can use Substitute in an upwind part of your Let() and nuke the escape code from the total string and parse what remains of it.

Link to comment
Share on other sites

  • Create New...

Important Information

Terms of Use