Another RegEX question

Hi, I have a question about the regular expression: If you look at the attached code you will find two examples. It is an old piece of code, but now I have to fix a bug that was discovered after a few years of use. Task: If the entry is for example C1 - C4, the algorithm needs generate a table of C1, C2, C3, C4. This should work on any digit and letter. Examples: R1 - R5, K569-K799, S2 - S3. This works very well for [letter] [number], but my regex won't work for the case now, I have to solve. If the entry is C1A1-C1A4 the output should be C1A2 C1A1, C1A3, C1A4, but I don't know what should look like the new RegEx so that it still works on [letter] [number] [letter] [number].

You can not only use [0-9] + $ to return only the number of the end of the string?

Regular correspondence Expression.vi will return all the foregoing the final number in 'before the game '.

I'm sorry that I can't look at your code since I don't have a LabVIEW 2011 on my system.

Rob

Tags: NI Software

Similar Questions

  • Yet another silly question

    So, quickly followed by the post, I did earlier this week:

    http://forums.Lenovo.com/T5/T61-and-prior-T-series-ThinkPad/what-am-I-missing-overheating-fans-tpfan...

    Yesterday, I disassembled the T60 - B, cleaned the fan, memory up to 2 GB in an accident and swapped the screen with the T60 - C flexview. And replaced broken front with another Panel before broken, but this one doesn't gouge in my thumb.

    Anyway, everything is going very well, no remaining parts and screws and it now works better (and cold) than ever.

    Question is, is there a different display driver should I br running in order to take full advantage of this upgrade of the screen? Maybe I missed something, but I don't see anything on the list of drivers that jumps out to me...

    Once again, thank you!

    I think you are missing the point. The T60 has optional motherboards and option screens. Each dimension of plate came in four different styles at least. Card Intel graphics, two with ATI Radaen and two with ATI fireGL. I guess you have a 15 "model and updated since a XGA (1024 x 768) screen to a screen flexview SXGA + or UXGA. Change the screen will not involve the change of pilots, but the flexview screens use a different ups, if you don't change your xga may not be the power inverter to operate the screen to its full potential.

    PS it would have probably been better continue your old topic instead to make a new, or posted at least all the specs of your system in the new if we do not have to guess what you might have.

  • BlackBerry smartphones another little question from a novice on windows authentication

    Hi, I posted a question a few weeks ago, to summarize, I recently dumped my treo for the new storm.  I enjoy them until now, but I have a question to get connected to a windows site.

    I use logmein for mobile access, (www.logmein.com), it's like gotomypc, but free and I used to be able to log in with my treo smartphone, but I'm having a problem on my BB.  I spend all the stuff (on the site of logmein) html Web page and get to the point where I have to put the password for the computer that I'm remote'ing.  The phone's browser has "Windows authentication" in the upper part, followed by three text fields, username, PW and domain.  I don't have a domain, but when I entered the username and password, I can't select the "login" link just in the middle of the page at the bottom. "

    I tried everything, he can't know.  Also, on this screen, zoom and other "typical" controls are not available, as the keyboard and a few other navigation options (none is "next" or "enter")...  Oh, and another thing, when I click on the screen where the "login" link is, it locks the keyboard back to the top and sometimes wipes all the text on the fields?...

    Thanks in advance...

    Thanks for the help, it turns out looking as if it was a problem on the side of the House Logmein.com...

  • Another RAID Question :)

    Until recently, we bought our licenses for ESXi 5 and before I have order my raid controller I would check with the community on certain things.

    Based on research I did on the forums and on the compatibility list, it's a pretty decent controller:

    http://www.Newegg.com/product/product.aspx?item=N82E16816118170

    What we seek to do is to take the above 8 port controller and set up 4 disks in RAID 10. Then down the line, connect a 4 discs additional for the controller even in another configuration of raid 10 or two matrices RAID 1.

    So my question is this: is it possible to install ESXi 5.5 on the first RAID 10 configuration, then later, to create additional tables on the same controller and then assign them to the existing installation of ESXi?

    Thanks in advance for answers!

    Yes, you can add new bays starting from the same controller to your ESXi installation at a later date. This will be done through host Configuration > storage. Once the berries are configured, they will appear in the list of available LUNS and can be connected to ESXi like additional data stores.

    I don't have experience with this particular model of LSI first hand, but it is listed on the HCL 5.x ESXi, so you should not encounter compatibility problems.

  • Another quick question of CSS layout - vertical align: middle

    Just another quick on the use of CSS to the content of the page within the section of the page layout.

    On the homepage below, I have some images with text next to them:

    http://www.Haiji.jp/

    Because of the uneven text, it would be better if the text on the right and left of the four images vertically flown in space.

    (Basically like this old version of the table according to: http://www.haiji.jp/indexcopy.php )

    I don't know vertical-align: middle; doesn't really work for this, but could not get the right way to work.

    I tried variations to have an external container positioned a parent and an absolutely positioned inner container and using top: 50%;

    So for the first row for example CSS is:

    #outerWrapper #contentWrapper #content #row_one {}

    Width: 620px;

    overflow: hidden;

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_left {}

    Width: 210px;

    padding: 0px;

    float: left;

    margin: 0 0 0 0; / * Sets the properties of margin for an element using the shorthand notation (up, right, down, left) * /.

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_right {}

    Width: 410px;

    padding: 0px;

    float: right;

    text-align: left;

    margin: 0 0 0 0; / * Sets the properties of margin for an element using the shorthand notation (up, right, down, left) * /.

    position: relative;

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_right #row_one_right_content {}

    position: absolute;

    top: 50%;

    }

    Who is not doing and maybe overloading the question.

    But if anyone can let me know how to get this vertically positioned text which would be a good thing.

    Thanks again.

    Support IE7 you need to "hack" a little: adjust the "padding-top" according to the number of lines of text, it is a. (not a good solution as supposition is working but IE7 IS a marginal browser now)

    Then add

    the text (see below)

    http://ALT-Web.com/images/alt-Web-logo.gif"/ >

    Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor. Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor.

    http://ALT-Web.com/images/alt-Web-logo.gif"/ >

    Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor. Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor.

    http://ALT-Web.com/images/alt-Web-logo.gif"/ >

    Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor. Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor.

  • [JS] [regex] Question autour forming a regex

    Hello.

    I'm trying to use a regular expression to filter the non-url characters and replace them with % 20.  I have this line:

    myChangedError = myErrorText.replace(/[-\w\.@\\]/g,"%20"); but it does not work.

    I'm new on using Regex and want to know more, but this seems pretty basic, and I should be in this!

    Can anyone help?

    Thank you very much

    Roy

    A mistake, what is that supposed to do regular expression? Maybe you wanted to use /[^\w\.@\\]/ instead of /[-\w\.@\\]/?

    (Your question would be also much clearer if you were specific - what is an example of a character who is treated wrongly. What are you waiting for and what happened?)

    In General, if you are worried about security, you should explicitly include the characters, not blacklist some that seem dangerous to you. Being generally more dangerous than you know.

    You can also find more useful using encodeURIComponent (myErrorText) or maybe encodeURI (myErrorText), according to what it is you want to do. [What do you want?]

  • Regex question

    Someday I'll learn Regex. However, that day is not yet. What I have to do is choose the string in square brackets [abcde] returns abcde. I thought it would be something like------[(.+)------] but I can't run in LabVIEW. Suggestions?

    You have the regular expression on the right. Here is the code that I tested. (One of the constants represent values in controls and indicators)

  • Yet an another microSD Question (it's different!)

    Hello, new Member here! (^^) And Yes, I use the search option. I have read the FAQ; and I look at the manual.  And my question was never answered.  I hope someone answer me soon!  Thanks in advance!

    PS: Can I suggest a topic "microSD (HC)" added to the FAQ?  It could include my questions and questions of other people as well. = D

    In any case... I have problems with my MicroSD Kingston 2 GB card. The card works fine on my computer, but it does not work in my Sansa Fuze 2 GB drive.  Not at all.  And Yes, I only put MP3 files on the card... not video.

    I noticed that many people had similar problems (but not exactly the same thing), so I was wondering:

    1) products Kingston are incompatible with the Sansa? Other people keep problems with cards Kingston, so I thought I'd ask.

    2) that I must have a microSDHC card? My card is a microSD card.

    3) the card must be formatted in FAT16 exactly?  One of your textbooks said I should use "FAT16 or higher"... but when I formatted in FAT32, it still does not work. "" The map was originally in FAT format, and it did not work in this format either.

    ... Not sure if this will help, but my computer is a Windows Vista. And he gave me 4 formatting options: NTFS, FAT, FAT32, exFAT.

    And if all else fails...
    4) what is the warranty for my Sansa product, just in case the microSD slot is broken?  I bought it in late July or early August of this year (I still have my receipt + guaranteed somewhere; it is irrelevant at the moment because I recently moved). I'm still in my warranty or not?

    It's a good idea to insert or remove a card when the player is turned off. The card slowly and gently.

    "What are the chances that my microSD card will get stuck in the drive of Fuze?

    I have heard talk of this never happens. My digital camera has a similar mechanism, but uses a full size SDHC.

  • BlackBerry Smartphones an another Noob Question (re mp3)

    Can I buy MP3s from Amazon or somewhere like that and put them on my Blackberry?  I'm confused whether the BB has a mp3 player.  Probably a stupid question, but thanks.

    Hello!

    Here's a knockout who deals with BB-compatible media formats:

    http://www.BlackBerry.com/BTSC/search.do?cmd=displayKC&docType=kc&externalId=KB05482

    Indeed, the BB has a player - it should be the icon on your homescreen called "Media".

    See you soon!

  • Another analytical question


    Hi and thanks for your help as always!

    That could be simple and can be answered several times already, but I'm stuck somewhere, sorry.

    I'm in Oracle 11 g and that is the question.

    There are two tables:

    t_user_lk one

    create table t_user_lk (user_name, VARCHAR2 (20), activity_dt DATE)

    and b t_user_activity

    create table t_user_activity (user_name, VARCHAR2 (20), activity_dt DATE, app VARCHAR2 (20))

    Need of a query to select the latest 5 apps from t_user_activity user_name table and activity_dt table t_user_lk.

    (where a.user_name = b.user_name and b.activity_dt < = a.activity_dt)

    And here is the simple test data:

    create table t_user_lk (user_name, VARCHAR2 (20), activity_dt DATE)

    insert into t_user_lk (user_name, activity_dt)
    values ('a', to_date (8 August 2013:10 1 ',' DD-MON-YYYY HH24 '));

    insert into t_user_lk (user_name, activity_dt)
    values ('b', to_date (August 1, 2013 8:20 ',' DD-MON-YYYY HH24 '));

    insert into t_user_lk (user_name, activity_dt)
    values ('a', to_date (August 1, 2013 8:30 ',' DD-MON-YYYY HH24 '));

    create table t_user_activity (user_name, VARCHAR2 (20), activity_dt DATE, app VARCHAR2 (20))

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:00 ',' DD-MON-YYYY HH24 '), 'app_1');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:01 ',' DD-MON-YYYY HH24 '), 'app_2');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:02 ',' DD-MON-YYYY HH24 '), 'app_3');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:03 ',' DD-MON-YYYY HH24 '), 'app_4');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:04 ',' DD-MON-YYYY HH24 '), 'app_5');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:05 ',' DD-MON-YYYY HH24 '), 'app_6');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (8 August 2013:10 1 ',' DD-MON-YYYY HH24 '), 'app_7');

    ----------------------
    insert into t_user_activity (user_name, activity_dt, app)
    values ('b', to_date (August 1, 2013 8:00 ',' DD-MON-YYYY HH24 '), 'app_1');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('b', to_date (August 1, 2013 8:01 ',' DD-MON-YYYY HH24 '), 'app_2');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('b', to_date (August 1, 2013 8:02 ',' DD-MON-YYYY HH24 '), 'app_3');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('b', to_date (August 1, 2013 8:03 ',' DD-MON-YYYY HH24 '), 'app_4');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('b', to_date (August 1, 2013 8:04 ',' DD-MON-YYYY HH24 '), 'app_5');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('b', to_date (August 1, 2013 8:05 ',' DD-MON-YYYY HH24 '), 'app_6');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('b', to_date (8 August 2013:10 1 ',' DD-MON-YYYY HH24 '), 'app_7');

    ------------------------------------------------

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (8 August 2013:15 1 ',' DD-MON-YYYY HH24 '), 'app_1');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:16 ',' DD-MON-YYYY HH24 '), 'app_2');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:17 ',' DD-MON-YYYY HH24 '), 'app_3');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:18 ',' DD-MON-YYYY HH24 '), 'app_4');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:19 ',' DD-MON-YYYY HH24 '), 'app_5');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:20 ',' DD-MON-YYYY HH24 '), 'app_6');

    insert into t_user_activity (user_name, activity_dt, app)
    values ('a', to_date (August 1, 2013 8:21 ',' DD-MON-YYYY HH24 '), 'app_7');

    select * from t_user_activity order to user_name, activity_dt

    The output should be like this:

    User_name

    Activity_dt

    Rank

    App

    one

    1 AUG 13 08:10

    1

    app_7

    one

    1 AUG 13 08:10

    2

    app_6

    one

    1 AUG 13 08:10

    3

    app_5

    one

    1 AUG 13 08:10

    4

    app_4

    one

    1 AUG 13 08:10

    5

    app_3

    b

    1 AUG 13 08:20

    1

    app_7

    b

    1 AUG 13 08:20

    2

    app_6

    b

    1 AUG 13 08:20

    3

    app_5

    b

    1 AUG 13 08:20

    4

    app_4

    b

    1 AUG 13 08:20

    5

    app_3

    one

    1 AUG 13 08:30

    1

    app_6

    one

    1 AUG 13 08:30

    2

    app_5

    one

    1 AUG 13 08:30

    3

    app_4

    one

    1 AUG 13 08:30

    4

    app_3

    one

    1 AUG 13 08:30

    5

    app_2

    LSY, thank you very much.

    Select

    user_name

    activity_dt

    rn rank

    app

    de)

    Select

    App

    user_name a.user_name

    a.activity_dt activity_dt

    row_number() on rn (partition a.user_name, a.activity_dt b.activity_dt desc order)

    Of

    t_user_lk one

    t_user_activity b

    where

    a.user_name = b.user_name

    and

    b.activity_dt<=>

    )

    where rn<>

    order by

    activity_dt

    rn

  • Another interesting question of synchronisation in 3.3.0.747

    I have a table of table that has been designed from a database schema. The table has now been moved to a different database in another schema and changed.

    3.3, I am able to re-point of the synchronization model with the data dictionary for the new database connection, but the result is the wizard says the table isn't in the new database and therefore should be removed from the model.

    I executed the script of meta-data table clear that Philip wrote earlier, but get the same result.

    How can I get is the tool to recognize the table in the new database, but the model needs to be updated?

    Hello Kent,

    You can change the schema in the model and use synchronization utility or can use wizard 'import of data dictionary.

    Philippe

  • Regex question - class character and regex

    Hello world!

    I want to use regex in Java but without success. Clues to this situation?

    I'm writing a method that generates the password.
    However, I would like to exclude como character which could easily confused.
    If I found the string match these characters, I will regen.

    I try to write it in Java, but does not match.
    Pattern.Matches ("[oO0iLIz2]", "01234");

    Note, written in Perl, my expression as
    $pw = ~ m / /ig [o0liz2];

    Then. How to code that this can work? and by the way.
    How to write the model so I can ignore the case?

    Thanks in advance!

    868369 wrote:
    I have not found most significant in the javadoc that what you have said.

    Then you to not read closely enough. The doc to matches() says:
    >
    behaves in the same way as the expression

    Pattern.Compile (Regex). Matcher (Input). Matches()
    >

    And if you look at the doc for Matcher.matches () that is mentioned here, you will see:
    >
    Attempts to match the entire region against the boss.

  • Another recursive question

    Hello

    I'm doing a program that generates the n-bit Gray code. Binary thinking, also known as the Gray code, is a binary numeral system where two successive values differ in only one bit.

    Another explanation would be - a bit grey n code is a list of 2 ^ n different n-bit binary numbers such that each entry in the list differs just slightly from its predecessor.

    If I want to generate 1-bit gray code that would be:

    * 0 *
    * 1 *

    2 - bits would be:

    * 0 0 *.
    * 1 0 *.
    * 1 1 *.
    * 1 0 *.


    3 - bits would be:

    * 0 0 0 *.
    * 0 0 1 *.
    * 0 1 1 *.
    * 0 1 0 *.
    * 1 1 0 *.
    * 1 1 1 *.
    * 1 0 1 *.
    * 1 0 0 *.

    and so on.


    That's what I have so far:
    public class GrayCode {
    
         static void genGC(int n){
              
              if(n == 0){
                   System.out.println(n);
              }
              else{
                   genGC(n-1);
                   
                   genGC(n-1);
              }
              
         }
         
         public static void main(String[] args) {
              
              int a = 1;
              
              genGC(a);
    
         }
    
    }
    Thus, in the case 1-bit gray code the program above would be output:

    * 0 *
    * 0 *

    for the 2 - bit code:

    * 0 *
    * 0 *
    * 0 *
    * 0 *

    etc.

    Any ideas or advice what to do to go further are greatly appreciated.
    Thanks in advance.

    blias says:
    Edit: Actually not sure on the baseline scenario. Thus, when n == 0, we create a String [empty].

    What he has is suppoesd be: we create a String [] containing a single element, and this element is an empty string, "". However, for me, your comments sound 'empty String []' love new string [0], a String [] without items.

    So for n = 0, the list of channels is an element, «» Logic says that for g (1) we take that a single empty element for g (0), copy it and reverse the trend. So now we have "" and "" as the two pieces, which is the inverse of the other. And then add us "0" to the first "" and the prefix "1" to the second "", giving us '0', '1 '. And so on...

    (2) I leave you to think about why the numbers 1, 2 and 5 above call methods that return values, while 3 and 4 use all the return values. If you get stuck, however, I'll explain it.

    Sometimes I get confused whether to create a method that returns something or to have Sub. When I work on other problems, sometimes I'm in doubt - why do I need a method that returns the value or else vs vacuum and vice versa. I think more practical, the understanding of this would eventually come.

    In this particular case, 1, 2 and 5 are creating new objects, so call us a method that creates the object and returns. For 3 and 4, we take just existing bays and edit their content. Nothing magical here. Just going by what says the abstract steps.

    As I said earlier - for me it is more difficult to break down the problem to the smaller, small problems to break the smaller yet more and so on until I get simple steps rather than coding real itself.
    Do you know if there is no method to this approach to the failure or is it just common sense?

    I can't give you a magic formula. For me, it's just a matter of logic, common sense and experience. Most likely (mumble) years of experience let me forget a lot of the details of the trip.

    jverd, you're the greatest teacher I've ever had. Seriously.
    I do thank you again for your time and for all. :)

    Meh, I have good days and bad as someone else. Glad to be useful! And thanks for the compliment!

    Edited by: jverd March 30, 2011 12:41 AM

  • PrintDataGrid another a question

    Hello everyone,

    now I have the PrintDataGrid object printed on paper, but there a few long sentences of string in its dataprovider, then anyone can say a stylename or another way to get printed lines higher as many text strings consists of components. Now, it only displays the first line, the same number of characters as the column width allows.

    Thank you, Alex.

    You have set variableRowHeight = true and wordWrap = true on the columns?

    If you have any custom renderers, see the latest post on my blog.

    http://blogs.Adobe.com/aharui/2010/10/MX-DataGrid-list-and-variablerowHeight

    .html

    --

    Alex Harui

    Flex SDK Team

    Adobe System, Inc..

    http://blogs.Adobe.com/aharui

  • Another easy question for a beginner

    Example: Pig picks up Apple with pig.addChild (apple);

    If, say, a bird wants the Apple but the pig there:

    If (bird.hitTestObject (apple)

    {

    bird.addChild (apple);

    Apple.x = 0;

    Apple.y = 0;

    }

    and the pork and the apple touch the bird, Apple remains with the pig.

    If an object is a child of another object like the pig, it's (the Apple in this case) dependent on only this object (the pig)?

    Thanks for any input

    Shiim

    You are welcome.

    p.s. Please mark this thread as answered.

Maybe you are looking for

  • Firefox will not update to 12 from 8

    The application databases Name Firefox Version 8.0.1 User Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1 Profile Directory Open Containing Folder Enabled Plugins about:plugins Build Configuration about:buildconfig Cr

  • dedicated to the Pro iPad iOS?

    Hi, I bought an iPad Pro and I want to use it in my class (I'm a physics teacher). But I'm afraid that I will be prevented with iOS9 (for example with some applications like plot2 that no longer exists on the iPad or the use of animations flash for e

  • Timeout and structure of the case

    Hello everyone. I need a case structure, which is controlled by a Boolean button. I need to use my time-out of my button to switch to "true", but it fails:

  • 15j101sf HP ENVY: find a new keyboard for a laptop HP ENVY15-j101sf

    2 weeks ago, I spilled water on my keyboard. As a result, there are now a few buttons not functioning correctly, then I want to replace my keyboard. Could someone tell me where I can find a new keyboard for my HP Envy 15j101-sf. I'm in France, so, pr

  • ISE 1.2 IETF attribute box 88-pool not available

    With the help of ISE, 1.2 and establishment of a new sequence of Radius Server I am unable to use the IETF Radius 88 (box-pool) attribute because it is not displayed in the IETF Radius dictionary. Is there a reason for this? Most of the other attribu