Newb Trying to extract a substring...

I am trying to automate the copy/paste of various fields from Safari to a mailing application. Step one is collecting the data from the browser page. I discovered how to capture the source using a shell call to curl, and I've been merrily extracting fields based on delimeters that happen to appear. Until now.
I've got this string, "Label: EXL120-3D</td>
<td"
I'm fairly certain there is a CR/LF at the end of the </td>
I need to extract the "EXL120-3D" portion.
I thought I could extract what I want with something like:
copy characters 8 through (TmpStockNumLength - 14) of TmpStockNum as string
But that gives me: "E X L 1" which is not what I need. It's a series of characters and blanks, not my sub-string.
I don't get it.
Can someone help?
Thanks!
Steve

Woo Hoo!
Thank you! Although the initial try gave me <<event misccopy>> in place of the "copy" command, it did get me on the right trail, and I solved it with:
copy characters 8 through (TmpStockNumLength - 9) of TmpStockNum as string to StockNum
THANK YOU!
Steve

Similar Messages

  • How Can I Extract a Substring in WHERE Clause of CFQUERY ?

    Is it possible to extract a substring in the WHERE clause of either <CFQUERY> or in a Query of Queries?  I am trying to use the following query to find all email addresses with the domain "comcast.net" (i.e. everything after the "@" in the email address).  I am querying an MS-Access database table.
    <cfquery name="test" datasource="membership">
          SELECT email_address
          FROM tblMembers
          WHERE MID(email_address, INSTR(email_address, '@') + 1) = 'comcast.net'
    </cfquery>
    If I attempt this as a query, I get the error message "[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression."
    If I attempt it as a QoQ, I get the error message 'Encountered "MID ( email1 ,. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,'.
    I would be very grateful for any help on finding something that works!  Thanks for your help!

    Couldn't you do a LIKE in the where clause instead:
    SELECT email_address
    FROM tblMembers
    WHERE email_address LIKE '%@comcast.net'
    That should get you the addresses you are looking for.
    -Carl V.

  • How do I extract a substring when I know what become before and after it

    I am able to get the HTML source of a web page and I want to get certain information from it.
    I am trying to extract a 1 or 2 digit number but sometimes it is not there but I know that this comes exactly before the number if it exists or not
    "</td>
         <td class="alt1">"
    Which translates to regex as "</td>\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t<td class=\"alt1\">" Then the number appears just after the "<td class="alt1">" and I want to automatically say its 0 if its not there.
    How easy is it to extract that number?

    Normally I would be happy to help you, but after several years of trying to help here, I've decided not to contribute anymore because of the piss-poor way in which this site is being administered.
    Others are still helping, but more may leave if things don't improve. May I recommend devshed or javaranch?
    http://www.devshed.com/
    http://www.javaranch.com/
    If you would like to complain to the admins of this forum, either click the "Report Abuse" link or the "Feedback" link.
    The forum denizen formerly known as [url http://forum.java.sun.com/profile.jspa?userID=2959]jverd

  • Sender RFC adapter Error- request was null while trying to extract it.

    Hi All,
    I  have a scenario running in Production(PI 7.0 system) where SAP ECC sends RFC request through sender RFC adapter. The scenario was working fine but now I am getting the below error in default trace and I couldn't see any error in communication channel monitoring.
    java.lang.Exception: RfcServer[BAS_ECC_RFC_Snd]1[AFSenderD] request was <null> while trying to extract it.
    I have gone through the below thread and performed a full cache refresh but it didn't help :  
    [NULL]
    I have gone through SAP note:730870 and I couldn't get any help on this error. Can you please suggest your ideas to solve this issue.
    Thanks & Regards,
    Laawanya

    Hi Lawanya,
    Check you RFC and input data , whether the RFC call is able to get the data from ECC or not.
    you can test the same RFC in ECC with input data and you can check whether the RFC in ECC is return the value or not.
    I gues in your case the RFC in ECC is not return any data  to PI.

  • Reading a tab delimited file and extracting a substring

    hi all,
    i have a text file which is tab delimited,which contains keys and values.like the first 3 lines are keys which are like 50 keys(1-50).The remaining lines contains values..so that when it is is opened in excel sheet each value gets mapped to its key.My problem is i have to extract a substring between the two keys from the text file...for eg. between
    (10-11)..does anyone know how to do it.if so please post it.
    thanks

    I'm not sure what your question is. The API docs for String.substring(int, int) are fairly straightforward. You will call String.indexOf(String) to find your delimiter. If you only want the portion after the delimiter, then call String.substring(posDelimiter + 1) and you are done. If you want the portion before the delimiter, then call String.substring(0, posDelimiter). If you want a portion between two delimiters, then call String.indexOf() again, and then call String.substring(startDelimiter + 1, endDelimiter);
         static final public void main(final String[] args) {
              String test = "Hello World=Java Program";
              // Portion before a delimiter (=)
              int posDelimiter = test.indexOf("=");
              System.out.println(test.substring(0, posDelimiter));
              // Portion after a delimiter (=)
              System.out.println(test.substring(posDelimiter + 1));
              // Portion between two delimiters (space)
              int posStart = test.indexOf(" ");
              int posFinish = test.indexOf(" ", posStart + 1);
              System.out.println(test.substring(posStart + 1, posFinish));
         }- Saish

  • Error when trying to extract data from Solman to BI 7

    Hi,
    We are trying to extract data from Solman 7 to BI 7. The following extractors have been activated on Solman since we want to be able to report CCMS ALERTS and System availability on Bi Portal.
    Transaction SPRO -> SAP Reference IMG -> SAP Solution Manager -> Scenario-Specific Settings -> Operations -> BI Reporting
    transaction: RSA5 (Installation of DataSource)
    0SM_SMG_ROOT Oberster Knoten Solution Manage
    0SM_SMG Solution Manager
    0SM_DSWPBI_DB390
    0SM_DSWPBI_DB400 DB400 Data
    0SM_DSWPBI_DBADA Adabas Data
    0SM_DSWPBI_DBDB2 DB2 Data
    0SM_DSWPBI_DBINF Informix Data
    0SM_DSWPBI_DBMSS SQL Server Data
    0SM_DSWPBI_DBORA Oracle Data
    0SM_DSWPBI_MODUL Module Data
    0SM_DSWPBI_PERF Performance Data
    0SM_DSWPBI_SERVER Server Data
    0SM_DSWPBI_SYSDATA System Details Data
    0SM_DSWPBI_SYSTEM System Data
    Our current situation is that we have scheduled the jobs through Solution_manager > solution Reporting > BI Data collection. Yet no data has been collected and the jobs are getting cancelled.
    Has anyone come accross this same situation before? Plus I have just found out that on SOLMAN_WORKCENTER under System Monitoring there is a reporting step named IT PERFORMANCE reporting that needs to be configured.
    Please advice since this will be critical for our busines.

    Hello,
    I have collected the data from our systems successfully. I have implemented the steps lsited at http://help.sap.com/saphelp_sm70ehp1_sp26/helpdata/de/45/51fbdbd4941803e10000000a1553f7/frameset.htm and it works fine.
    Regards
    Andreas

  • I am trying to extract an .Irtemplate file to access a file of lightroom presets I just purchased online

    I'm trying to extract an Irtemplate file to access my purchased lightroom presets.  Each time I select it, I get an error saying I don't have an application to unzip the file.  Apple looked into it and says it is either a problem with my lightroom or I am lacking a plugin from you to do so.  Can you help me? 

    I'm trying to extract an Irtemplate file to access my purchased lightroom presets.  Each time I select it, I get an error saying I don't have an application to unzip the file.  Apple looked into it and says it is either a problem with my lightroom or I am lacking a plugin from you to do so.  Can you help me? 

  • I'm trying to extract audio files from my OLYMPUS Digital Voice Recorder VN-6200PC I am getting this error whenever I try to play its file type on my MacBook Pro,"The document "VN622195.WMA" could not be opened. The movie's file format isn't recognized."

    I'm trying to extract audio files from my OLYMPUS Digital Voice Recorder VN-6200PC
    I am getting this error whenever I try to play its file type on my MacBook Pro,"The document “VN622195.WMA” could not be opened. The movie's file format isn't recognized."

    The mac has no native way to read .wma files (these are Windows Media Audio files).  Do a search on the internet for playing wma files on a mac.  You will find several links to solution (one is to use flip4mac).

  • HT5163 Hi, I'm trying to extract the nano sim tray on my new Ipad air. I know how it should come out but the tool does not seem to release the tray. Any ideas?

    Hi, I'm trying to extract the nano sim tray on my new Ipad air. I know how it should come out but the tool does not seem to release the tray. Any ideas?

    Thanks. It needed more pressure than I expected!
    Didn't want to break it when it's less then 24 hours old!
    BB

  • WINRAR error when trying to extract NW2004s Sp11 (abap)

    Hello All,
    I received the following error when trying to extract NW2004s Sp11
    <b>!   E:SAPNW2004sABAPTrialSP11.part1.rar: CRC failed in SAPNW2004sABAPTrialSP11imageloadload_datasave.gz. The file is corrupt
    !   E:SAPNW2004sABAPTrialSP11.part2.rar: CRC failed in SAPNW2004sABAPTrialSP11imagesetup.jar. The file is corrupt
    !   E:SAPNW2004sABAPTrialSP11.part2.rar: CRC failed in SAPNW2004sABAPTrialSP11maxdbtoolsSQLSTD76.exe. The file is corrupt</b>
    I thought this was a download error and downloaded it again but the same error occured at the very same place.
    I get this error at exactly 99% extraction of
    Part 1(rar part no.71 - load_datasave.gz),  and in the begining of Part 2.
    It takes me about 2 days to download the parts and as you can imagine it can be really frustrating...
    I tried downloading using FlashGet(a downloader) as well as the normal save as... in IE, both ways I get the same error.
    Can someone please check to see if your RAR files(in the server) are corrupt?
    If not, can someone advice where else I can get this software?
    Thanks,
    Faheem

    Hello Faheem,
    You could compare the file sizes of your files with the sizes given on the
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/b2918eea-0601-0010-6284-e6cb7eee4399">download [original link is broken] [original link is broken]:
    <b>
    ABAP Edition File 1 (file size exactly: 1.536.000.000 bytes)
    ABAP Edition File 2 (file size exactly: 1.161.657.000 bytes)
    </b>
    Don't forget to put both parts in the same folder and extract just the first part. The second will be extracted automatically.
    Hope this helps.
    Kind regards,
    Klaus

  • When i am trying to extract Dimension into .txt file. I am getting error.

    Hi All,
    When i am trying to extract the Essbase Dim into .txt file, i am getting below error.
    Please find the details.
    V10.1.3.5.0 and MySql server as database.
    com.sunopsis.sql.c: com.sunopsis.jdbc.file.FileDriver
         at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.t(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.connect(SnpsConnection.java)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:662)
    Please help me in this issue.
    Regards,
    Krish
    Edited by: 897734 on Dec 20, 2011 2:40 AM

    If you think a file doesn't exists when you think it should, you can use code like this to print out what files are there:
    import java.io.*;
    public class Periscope {
        public static void check(File file) {
            if (file.exists()) {
                System.out.println("file exists: " + getPath(file));
                System.out.println();
                System.out.println("DUMP:");
                System.out.println();
                dump(file, "");
            } else {
                System.out.println("file does not exist: " + getPath(file));
                goUp(file);
        static void goUp(File file) {
            File parent = file.getAbsoluteFile().getParentFile();
            if (parent == null) {
                System.out.println("file does not have a parent: " + getPath(file));
            } else {
                check(parent);
        static void dump(File file, String indent) {
            System.out.println(indent + getPath(file));
            File[] children = file.listFiles();
            if (children != null) {
                indent += "    ";
                for(File child : children) {
                    dump(child, indent);
        static String getPath(File file) {
            try {
                return file.getCanonicalPath();
            } catch (IOException e) {
                e.printStackTrace();
                return file.getName();
        public static void main(String[] args) {
            check(new File("foo.bar"));
    }

  • Error when trying to extract WBS Hierarchy

    Any help appreciated.
    Using BI7, when trying to extract the WBS Hierarchy from an R3 source system using DataSource 0WBS_ELEMT_WBSH_HIER during the extraction process the load fails with error "The level of the node ID 00041234 does not suit the lev of higher lev node"
    The long text talks about Parent and Child nodes. I believe the numbers being stated, 00041234 etc refer to the Technical IDs shown within the Hierarchy Display within BI. I've checked table PRPS in Project Systems and I assumed the numbers represented WBS Elements - but they do not match when checking the descriptions. (BI to R3)
    Checked on OSS and note 339453 may apply but Im not sure what to check / how to replicate. Based on the errors being reported in BI how can I identify the error in the R3 source system?
    Many Thanks
    Lee

    Closed as no responses.

  • No luck trying to extract .inf files from drivers downloaded as zip files

    Hi,
    I am trying to extract .inf files from drivers downloaded as zip files from the Toshiba website, but I'm having no luck.
    I am trying to deploy images using WDS on server 2008 and need the inf files for this to succeed, does anyone have the answer to this problem.
    thanks in advance.

    Hi
    I found this tip:
    Someone wrote this:
    +You have to run the installer, wait for it to get to the first point where you click Next to continue, and then leave it sitting there. Go into your system's Temp and find the particular one with the installation files inside it that were extracted, then copy it someplace, go back to the installer and cancel it.+
    You could also try this freeware application to extract the package:
    http://www.legroom.net/software/uniextract

  • Still trying to extract an email list from my contacts.  Any ideas?

    I am trying to extract a list of email addresses from my business conatcts.  I can't seem to get a list without dragging all of the emails to a new group.  Help!

    Barney,
    I have four groups.
    I just typed the name of one of those groups in the To field on the iPhone's email, and received:
    Invalid Address
    "<group name>" does not appear to be a valid email address.  Do you want to send it anyway?
    I clicked continue and it remains in my outbox.
    Help is appreciated.
    Thanks,
    Michael

  • W10TP - Trying to extract zipped files for VPN setup - Security Warning

    I am trying to extract .msi & exe files from a zipped file but receive "Windows found that this file is potentially harmful." To help protect your computer windows has blocked access to this file." I cannot see an option where i can
    override this restriction. Please advise.

    Hi Broccoli! Are you using FQDN or IP address? What firmware is loaded on your WRVS4400N? I had this problem before with WRVS4400N, I can’t establish VPN connection with other router when I’m using FQDN, according to Linksys tech support, if I’m using FQDN with WRVS4400N, then I also have to use the same model on the other side. I encountered this using 1.00.14 firmware. Have you tried the latest firmware (1.00.15)?

Maybe you are looking for

  • How do I add an ipad to my itunes account which was previously associated with another account and user?

    how do I add an ipad to devices in my itunes account which was previously associated with another account?

  • Intermittent JTable Selection Problem

    Hi, Everyone once in a while, under NT with 1.4.x, I have problems selecting and highlighting row under JTable. It happens a good bit, but this does not happen all the time. When the table is buggy, it does not keep the row selected nor does it highl

  • Native Reports of SAP B1

    Hello Experts, I am a beginner in SAP Business One. Could you, please, tell me how can I see the sql statements of some native reports of SAP B1 like "Inventory Reports"?, sometimes I must have the source tables of some reports for having a better  o

  • HP Dv5-1104tu Startup Problem

    I have a HP dv5-1104tu model laptop that doesn't start-up. Last time i hibernate that & now i my unable to start it. When i press power button it light up for a sencond or two and than goes off again. I try to fix it byself using pressing the power b

  • Sort artists with numbers as their names first

    Not to long ago, iTunes used to sort artists that had numbers in their names (311, 2pac, 50 cent) first on the list, which i loved because numbers should always come before letters, but in the recent updates with itunes, numbers are now last after th