The analysis of string values

Hello. I have a variable:

var myString:String = "811 812";

I want to be able to do is to have a code that crosses myString and analyzes the numbers between the commas. This value then is passed to my switch function where I assign methods based on the results.

As I am new to AS3.0, I don't know where to start.

Thanks for any help.

-Of

var myString:String = "811 812";

var re: RegExp = /, /;
Table of results: var = myString.split (re);

trace(result[0]); 811
trace(result[1]); 812

Tags: Adobe Animate

Similar Questions

  • Have to reset the flag of string value

    Hello everyone

    I'm trying to reset the flag of string value.

    I use node string indicator property to change the color, its evolution, but when the program runs again it should start default how to do it. Thanks in advance

    Here, it's in 2009

  • Doubt in the analysis of String

    Hello


    '23:BE|2009:A@Banglore '.

    I need to analyze the above string and retrieve the data.

    Now I use the StringTokenizer and my code is present,

    String sz = "23:BE|2009+A@Banglore";
    
              StringTokenizer szTkn = new StringTokenizer(sz, ":");
    
              System.out.println(" : " + szTkn.nextToken());
    
              szTkn = new StringTokenizer(szTkn.nextToken(), "|");
              System.out.println(" | " + szTkn.nextToken());
    
              szTkn = new StringTokenizer(szTkn.nextToken(), "+");
              System.out.println(" + " + szTkn.nextToken());
    
              szTkn = new StringTokenizer(szTkn.nextToken(), "@");
              System.out.println(" @ " + szTkn.nextToken());
    
              System.out.println(" " + szTkn.nextToken());
    is there a good way to do this?

    Vijay wrote:
    You can use backreferencing to capture any group in a correspondence of motifs.
    Take a look at this:
    http://download.Oracle.com/javase/tutorial/essential/regex/groups.html

    I don't see how "backreferencing' entry in this since the OP needs the content of field values between the separators without direct reference to what was found before.

    Since the original code fields are always there, and always in the same order, I think it is always more easy just use split()

    String sz = "23:BE|2009+A@Banglore";
    String[] splitSz = sz.split("[:|+@]");
    
  • the analysis of string data

    Hi all

    I got the series communation data string in this format:

    Bridge of fuse HtrPwrV VDispV/C PAO V/C DTM V/C DiffC NC
    OK VALIDATES 1.80 0.95 3.16 0.53 537 29.6
    369 647 110

    And I want to extract some value from it. I realized that they are separated with spaces between them. So I thought about transfer them into an array and then extract some lines/columns there. But I don't know how to do.

    Could you give me an idea. Or if you have a better way, then please show me!

    Thank you

    Here is a way.

  • The analysis of string in the input channels

    Hello

    I'm trying to parse a string into a matrix, or tables in real time. Thus, assuming that the line below is part of my entry

    A134B932C321D95E532F1024A13B932C321D95E532F1024

    I would like to analyze the data and constantly create a matrix (or a series of paintings), such that each row corresponds to a letter. For example, something like below:

    13 13

    932 932

    321 321

    95 95

    532 532

    1024 1024

    I was able to parse the string using the letters as delimiters, but I was not able to find a way to organize the values. The goal of my project is to receive 6 different a mircoprocessor input and displaying the entries on different graphics.

    Thank you in advance,


  • Question about the transition from string values to the Partition clause in a merge statement

    Hi all

    I use the code to update the data of specific secondary partition using oracle merge statements below.

    I'm getting the name of the secondary partition and pass this string to the secondary partition clause.

    The Merge statement is a failure, indicating that the specified secondary partition does not exist. But the partition under do exists for the table.

    We use a server Oracle 11 GR 2.

    Here is the code I use to fill in the data.

    declare
    ln_min_batchkey PLS_INTEGER;
    ln_max_batchkey PLS_INTEGER;
    lv_partition_name VARCHAR2 (32767).
    lv_subpartition_name VARCHAR2 (32767).
    Start

    FOR m1 IN (SELECT (year_val + 1) AS year_val, year_val AS orig_year_val)
    FROM (SELECT DISTINCT
    To_char (batch_create_dt, 'YYYY') year_val
    OF stores_comm_mob_sub_temp
    ORDER BY 1)
    ORDER BY year_val)
    LOOP
    lv_partition_name: =.
    () scmsa_handset_mobility_data_build.fn_get_partition_name
    nom_table_p = > 'STORES_COMM_MOB_SUB_INFO ',.
    p_search_string = > m1.year_val);

    FOR m2
    IN (SELECT DISTINCT
    'M' || To_char (batch_create_dt, 'MM') AS month_val
    OF stores_comm_mob_sub_temp
    WHERE TO_CHAR (batch_create_dt, 'YYYY') = m1.orig_year_val)
    LOOP
    lv_subpartition_name: =.
    () scmsa_handset_mobility_data_build.fn_get_subpartition_name
    nom_table_p = > 'STORES_COMM_MOB_SUB_INFO ',.
    p_partition_name = > lv_partition_name,
    p_search_string = > m2.month_val);

    DBMS_OUTPUT. Put_line (' lv_subpartition_name = > ' | lv_subpartition_name |' and lv_partition_name = > ' | lv_partition_name);

    IF lv_subpartition_name IS NULL
    THEN
    DBMS_OUTPUT. Put_line ("to the INTERIOR of FI = > ' |") M2.month_val);
    INSERT INTO STORES_COMM_MOB_SUB_INFO (T1)
    T1.ntlogin,
    T1.first_name,
    T1.last_name,
    T1.job_title,
    T1.store_id,
    T1.batch_create_dt)
    SELECT t2.ntlogin,
    T2.first_name,
    T2.last_name,
    T2.job_title,
    T2.store_id,
    T2.batch_create_dt
    OF stores_comm_mob_sub_temp t2
    WHERE TO_CHAR (batch_create_dt, 'YYYY') = m1.orig_year_val
    AND'M '. To_char (batch_create_dt, 'MM') =
    M2.month_val;
    ELSIF lv_subpartition_name IS NOT NULL
    THEN
    DBMS_OUTPUT. Put_line (' INSIDE ELSIF = > ' | m2.month_val);
    MERGE (SELECT *)
    OF stores_comm_mob_sub_info
    SUBPARTITION (lv_subpartition_name)) T1
    USING (SELECT *)
    OF stores_comm_mob_sub_temp
    WHERE TO_CHAR (batch_create_dt, 'YYYY') =
    M1.orig_year_val
    AND'M '. To_char (batch_create_dt, 'MM') =
    M2.month_val) T2
    WE (T1.store_id = T2.store_id
    AND T1.ntlogin = T2.ntlogin)
    WHEN MATCHED
    THEN
    GAME UPDATE
    T1.postpaid_totalqty =
    (NVL (t1.postpaid_totalqty, 0))
    (+ NVL (t2.postpaid_totalqty, 0));
    T1.sales_transaction_dt =
    LARGEST)
    NVL (t1.sales_transaction_dt,
    T2.sales_transaction_dt),
    NVL (t2.sales_transaction_dt,
    T1.sales_transaction_dt)),
    T1.batch_create_dt =
    LARGEST)
    NVL (t1.batch_create_dt, t2.batch_create_dt),
    NVL (t2.batch_create_dt, t1.batch_create_dt))
    WHEN NOT MATCHED
    THEN
    INSERT (t1.ntlogin,
    T1.first_name,
    T1.last_name,
    T1.job_title,
    T1.store_id,
    T1.batch_create_dt)
    VALUES (t2.ntlogin,
    T2.first_name,
    T2.last_name,
    T2.job_title,
    T2.store_id,
    T2.batch_create_dt);
    END IF;
    END LOOP;
    END LOOP;

    COMMIT;

    end;
    /



    Really appreciate your input here.

    Thank you
    MK.

    Hello

    You can use "immediate execution" what works.

    Thank you

  • the analysis of string separated by commas

    Hello people,

    Indeed, this forum is great and has always helped me a lot. I hope that this time remains the same. Thank you guys for you continues a support and help.

    I have a value string as a-, b, c, d, e, f

    Just sql help, I want to put each value of the string above in a different line. If the output should be-

    one
    b
    c
    d
    e
    f

    using procedures would not only complex, but I just want to do by using queries.

    Please advise,
    Thank you.
    SQL> with t as (select 'ABC,DEF GHI,JKL' str from dual)
      2  select regexp_substr(str,'[^,]+', 1, level) list
      3  from t connect by level <= NVL( LENGTH( REGEXP_REPLACE( str, '[^,]+', NULL ) ), 0 ) + 1
      4  /
    
    LIST
    ---------------
    ABC
    DEF GHI
    JKL
    
  • The analysis of string to xml format

    Dear all,

    I have an OSB service that returns an xml string output form.
    I call this OSB service in BPEL but it fails because of the format of the string received by BPEL.

    How can I avoid it. I also try to convert string to xml but failing to do so.

    The pointers to that would be useful

    Thank you and best regards,
    MITS

    try to set the response from transport HTTP header
    http:content-type=text/XML
    application/xml or (even better)

    (and of course, you must make sure you have fn - bea: inlinedXml() function to convert the string in an XmlObject)

  • Need to help in the analysis of string in JSON using PLJSON

    Hello
    I have JSON stored in a database field:

    -Query
    Select data1 from table1 where id = 339207152427;
    -Results:
    [{'name': 'Home'}, {'code': 'JPNWC74ZKW9'}, {'start date': ' 01\/02\/2014'}, {'name': "hhh, Rams '}]

    I need to analyze the above results in 3 fields in a separate table. For now, I just try to analyze the results using PLJSON, but get ORA-20101: JSON Parser exception - no {beginning found error during the execution of the following pl/sql block:}

    declare

    VIN_JSON varchar2 (4000);
    jsonObj json;
    listOfValues json_list;
    listElement json_value;

    Start

    Select data1 in VIN_JSON from table1 where id = 339207152427;

    jsonObj: = new json (VIN_JSON);
    listOfValues: = jsonObj.get_values ();

    I'm looping 1.listOfValues.count
    listElement: = listOfValues.get (i);

    end loop;
    end;
    /

    I believe that my syntax is close, but was hoping some new instructions.

    Thanks in advance!
    John

    The brackets indicate a list. If you already have a list and new json may not work.

    listOfValues := json_list(VIN_JSON);
    

    Published by: chris227 on 25.02.2013 12:52

  • The analysis of the data of a string of series

    Alert LabVIEW Express 7

    Sorry, all I have to work with and there is no budget at the moment to upgrade.

    Hello, I am in phase 1 (data transfer reliable to labview) 24/7 of my small Miettinen, who is to display and record data environmental Lab 24/7 our Fisher 02-403 digital barometer that has a serial port. In fact, it came with the software, but no one here seems to like use it so I'll try to find something more intuitive. I can't find any info at all about I/O with this device, so I'm reverse engineering. I'm sure that you cannot write anything to this device only read.

    I started with the connection of the device and the interface with NOR measure and automation and received the following string: P,43,1019,44,31,01,0023.0\r\n.

    I tried to use the Labview 7 Express e/s Companion Instrument, selected 1 COMM, changed the timeout to 5000 (trial and error), added a step reading and analysis, ran and received the following string: P, 43,0999, 44,41, 01,0018.0, XX. After well guess, I determined that the values I have in bold change with the environment and the other 3 are always the same idea 9no what they represent). Alphabetical 1 in bold represents the tendency of climate S sunny = P = C sunny cloudy = etc., the value 2 is the atmospheric pressure in hPa, the 3rd is % relative humidity and the last is the temperature in Deg. C.

    At first, I tried to create simply chips for data I want and operation loop the wizard of e/s in awhile, but often error messages obtained suggesting that I need to define all the tokens in the string. I did it and it worked, then I opened the front panel to access the underlying schemas whence I came with the attached VI. I left this race for more than 24 hours, no error, seems good.

    My question on this forum is, can I simplify this VI losing a part of the analysis of the data that I don't need at this point?

    Please let me know if you can not access this VI maybe I can do a screenshot or something.

    Thank you

    Doug

    Yes, it can be simplified to just a bit.

    Since you are new to LabVIEW, you can start with the basic tutorial.

  • The analysis of the non-numeric characters in a string

    Hello

    I am communicating a robot to LabVIEW (2013) via TCP/IP and sockets. The robot is the server, and LV is the customer.

    I start with the target data in this format (in a string):

    "[0 ~ 100 ~ 0] ~ [0.96593 ~-0.25882 ~ 0 ~ 0] ~ [1 ~ 0 ~ 0 ~ 0] ~ [150 ~ 50]."

    [X, Y, Z], [Q1, Q2, Q3, Q4], [C1, C4, C6, Cx], [TCPVel, OrientVel] except replacement ',' (comma) with a ' ~ ' (tilde) because I load the target data in a spreadsheet which is a comma-delimited file.

    In LV, I take this string, the analysis of the chain and split individual items. I then pulled the singular elements as unique, 32-bit of real numbers. I take each one and convert them individually to a string, concatenate them and send them to the robot. The robot decompresses these raw bytes individually and converts them to a target of robot (position in space).

    I train (BT) check if the user has sent a bad character (non-digital) in the target data. Example of this is:

    [- 50 ~-150 ~ 0] ~ [0.96593 ~-0 ] [B2has5D882 ~ 0 ~ 0] ~ [1 ~-1 ~ 0 ~ 0] ~ [150 ~ 50]

    Now in BT, when I'm scanning the chain, these bad character becomes the entire element to zero and everything else then to zero as well. See attachment for example screen similar.

    My question is, my VI, I can analyze all non-numeric characters (that are inside the parentheses and characters that are NOT a ' ~ ' (tilde))? In this way, I can always get this item numbers and do not have this element or other items turn to zero?

    Thanks in advance for any help!

    Sorry for the question of the test

    SM


  • Save the alphanumeric string value

    Hello!
    How to save a value to a variable so that I can use it in the future? I have a string of output of a case structure proposed by an OK botton. I want to save the string value when I press the ok botton...
    Thanks in advance
    GM

    Just write the string in a text file.  When you want to use it later, to read the text file.

  • Put the string value in a table

    Hello

    Probably an easy question, but I am reading data of a RFID reader that returns a string value of 12 bytes. Whenever a RFID reads, I want the tag to be inserted in a string table on the front panel. So, basically, a newspaper of the each tag [read-> Insert row 0] then [read-> Insert level 1] and so on. I work RFID reader, I don't know how to put the string in the table.

    I'm not sure of the steps necessary to achieve control of the table (or if the table control is the right thing to use).

    Any help would be greatly appreciated. Thank you.


  • Could not save the different string value to each element of the array

    I have a configuration of VI to read several channels Veristand project.  The entrance is a table 1 d of channels, (an element for each channel, I want to read).  The channels have different names, each of the elements in the chain must be different.  I am able to edit each item and run the VI, and it works fine.  However, if I save, close and reopen the VI, all elements show the same value (what happens to the value of the last element for which I defined a default value).  Is this behavior planned, or have I missed a configuration setting which would allow different string values?  Please notify.  Thank you.

    GSinMN

    Make sure that you select the table and not only one item when you right click-> set by default on the front panel.

  • ring with the string value

    I would like to know if there is a way to make a single control (either a ring or other) where a string that is displayed to the user has a string in its output value.

    For example, I have a power laser with a serial port and the command to turn on the laser diodes is LASER1;

    I want to display the 'LIGHTS ON' string to the user, but that control to provide 'LASER1' value when selected.

    It's easy to do with two controls, for example, can I have an enumeration with the display of the user strings and an enum with the chains of command of the laser, but then I have to make sure any changes affect the two controls.

    If it's a single control, it is less likely to be a mistake when a change is made.

    Any help is greatly appreciated.

    I'm using LabView 2009

    Never heard of the drop-down list box?  Could be a winner, just uncheck values Match points.

Maybe you are looking for

  • How to keep the tags when converting m4a OGG

    I have files m4a on the iTunes store. So far I have found no program that converts m4a ogg AND preserves the tags in the process. So far, I'm stuck with doing the conversion, then use MP3Tag to export m4a files tags manually to a text file and re-imp

  • How to convince me that I do not have a virus?

    For some reason, recently I became paranoid that my computer may have a virus.  However, I do not think, he does, but I could not convince myself that it is not.  I run F-secure as an antivirus and firewall, a router with a firewall so built his own,

  • Cannot install 2.5 "SATA HDD Inspiron 1525

    I read most of the posts, and I have tried EVERYTHING, no chance! Help! It's a WD blue 500 GB Here's what I tried... 1 format a partition using my brewing House, works well! Mounts and all! 2 formatted like a partition of concert 120 on my brewing Ho

  • Comment of the NAC server - how to reactivate suspended users

    I wonder if it is possible to reactivate the suspended users. My client wants to set up users invited to outside consultants who are on the site for a few weeks each year. He won't implement new users every year, instead of reactivate accounts suspen

  • Printer not priting wirelesly

    I have a Dell laptop with wireless all-in-1 and it does not print when I send a job. It will print with the USB cable plugged in, but not wirelesly. What is it?