Match Regular Expression does not match what Match Pattern does

I have read through a lot of posts about how Match Pattern does not match what Match Regular Expression will due to not processing some characters.
However, I found a problem with the other way. A simple Reg-Ex that works in Match Pattern but not Match Regular Expression.
What I have here is just an example. I want to use Match Regular Expression so I can specify some sub-matches.
The reg-ex is for: one or more non-numeric characters, a space, one or more numeric characters. At the start of the string.
How can I get this working in Match Regular Expression? I am working in LabVIEW 2010f2 32 bit. Here is the code snippet and the results:
Rob
Solved!
Go to Solution.

Robert Cole wrote:
I think I prefer the ~ for negation since ^ is also used for beginning of the string. But we work with what we have.
Let me offer you a tip and perhaps defend the honor of the regex a little bit.  One of my favorite features of regexes is the ability to specify character classes (and their negation).  One of the reasons I have to think about the ~ versus ^ is that I rarely use ^ in a regex alternative. 
Some examples:
[0-9] = \d (digit)
[^0-9] = \D (not a digit)
The equivalent regex for your case is: \D+ \d+

Similar Messages

  • JCOP Tools 3.1.1b: Debugger does not break, what am I doing wrong?

    Hey everybody
    I'm desperately trying to debug applets using the JCOP Tools 3.1.1b but when I start the applet in debug mode, the debugger does not break on the breakpoints I set. You might know the little ticks that appear on top of each breakpoint bullet in the editor. The strange thing is that these ticks do not even appear.
    I tried various versions of eclipse (3.1.0, 3.1.1, 3.1.2) and WinXP as wells as Linux. Does anybody else have the same problem or even a solution?
    Thanks
    Jonas

    hello,
    here are few steps you should check:
    - when you start the debug session JCOPShell will load the applet into the simulator. You have to first make sure the applet is loaded with debug info. JCOPShell should do that by default, but check on the trace that "upload" command is called with the -d option:
    upload -d "G:\glut-wks\JC\bin\helloworld\helloworld.cap" - then JCOPShell will install the applet with the "install" command. At that stage only the install function (and of course the constructor of the Applet) will be called. So breakpoints located in other part of the code won't break. Check the trace because if install is not called no applet code will be running.
    - after installation, applet must be first selected to get any of its code running. Use "/select |appletname". If you have a breakpoint at the beginning of the "process" method, it should break. if the Applet is not selected all future APDU will go to the cardmanager, and applet code won't be running.
    hope this help :)
    E.

  • Match Regular Expression not returning submatches.

    I am having an issue with Match Regular Expression not returning the appropriate number of submatches.  My string is as follows:
    DATAM    995000    1.75    0.007    -67.47    24.493    99.072
    The spaces are tabs and the length is not fixed so simple string manipulation is out of the question.  The regular expression I was trying is as follows:
    (?<=\t)[0-9\.\-]*(?=(\t|$))
    It successfully returns Whole Match as the first number but no submatches are returned.  I've tried simpler expressions which work in Matlab and EditPad Pro such as [0-9.-]* but never got the same answer in Labview.
    What is going on?

    Here is an image of the VI.  The top portion is the input from our Licor 7000.  The bottom portion is the bit of code I'm having problems with.
    Attachments:
    matchregularexpression.jpg ‏336 KB

  • Matching Regular Expressions in OBPM 10GR3

    Hi all,
    How do I match Regular expressions like" Wait For Response" in Strings using OBPM?
    Any idea?
    Is there any exact syntax?
    Because I tried doing this:-
    for( int i=0; i < testGroup.length(); i++)
         if(testGroup.reason.match(regexp : "Wait For Response"))
              logMessage("--Test Group Matched--");
    But it does not work..
    Any idea?

    String myVar = "has matching_char_set";
    if ( myVar.match(regexp : '/matching_char_set/') ) {
    logMessage("matched...yep");
    Try like this ..should work.
    Rgds,
    Biltu

  • "Match Regular Expression" and "Match Pattern" vi's behave differently

    Hi,
    I have a simple string matching need and by experimenting found that the "Match Regular Expression" and "Match Pattern" vi's behave somewhat differently. I'd assume that the regular expression inputs on both would behave the same. A difference I've discovered is that the "|" character (the "vertical bar" character, commonly used as an "or" operator) is recognized as such in the Match Regular Expression vi, but not in the Match Pattern vi (where it is taken literally). Furthermore, I cannot find any documentation in Help (on-line or in LabVIEW) about the "|" character usage in regular expressions. Is this documented anywhere?
    For example, suppose I want to match any of the following 4 words: "The" or "quick" or "brown" or "fox". The regular expression "The|quick|brown|fox" (without the quotes) works for the Match Regular Expression vi but not the Match Pattern vi. Below is a picture of the block diagram and the front panel results:
    The Help says that the Match Regular Expression vi performs somewhat slower than the Match Pattern vi, so I started with the latter. But since it doesn't work for me, I'll use the former. But does anyone have any idea of the speed difference? I'd assume it is negligible in such a simple example.
    Thanks!
    Solved!
    Go to Solution.

    Yep-
    You hit a point that's frustrated me a time or two as well (and incidentally, caused some hair-pulling that I can ill afford)
    The hint is in the help file:
    for Match regular expression "The Match Regular Expression function gives you more options for matching
    strings but performs more slowly than the Match Pattern function....Use regular
    expressions in this function to refine searches....
    Characters to Find
    Regular Expression
    VOLTS
    VOLTS
    A plus sign or a minus sign
    [+-]
    A sequence of one or more digits
    [0-9]+
    Zero or more spaces
    \s* or * (that is, a space followed by an asterisk)
    One or more spaces, tabs, new lines, or carriage returns
    [\t \r \n \s]+
    One or more characters other than digits
    [^0-9]+
    The word Level only if it
    appears at the beginning of the string
    ^Level
    The word Volts only if it
    appears at the end of the string
    Volts$
    The longest string within parentheses
    The first string within parentheses but not containing any
    parentheses within it
    \([^()]*\)
    A left bracket
    A right bracket
    cat, cag, cot, cog, dat, dag, dot, and dag
    [cd][ao][tg]
    cat or dog
    cat|dog
    dog, cat
    dog, cat cat dog,cat
    cat cat dog, and so on
    ((cat )*dog)
    One or more of the letter a
    followed by a space and the same number of the letter a, that is, a a, aa aa, aaa aaa, and so
    on
    (a+) \1
    For Match Pattern "This function is similar to the Search and Replace
    Pattern VI. The Match Pattern function gives you fewer options for matching
    strings but performs more quickly than the Match Regular Expression
    function. For example, the Match Pattern function does not support the
    parenthesis or vertical bar (|) characters.
    Characters to Find
    Regular Expression
    VOLTS
    VOLTS
    All uppercase and lowercase versions of volts, that is, VOLTS, Volts, volts, and so on
    [Vv][Oo][Ll][Tt][Ss]
    A space, a plus sign, or a minus sign
    [+-]
    A sequence of one or more digits
    [0-9]+
    Zero or more spaces
    \s* or * (that is, a space followed by an asterisk)
    One or more spaces, tabs, new lines, or carriage returns
    [\t \r \n \s]+
    One or more characters other than digits
    [~0-9]+
    The word Level only if it begins
    at the offset position in the string
    ^Level
    The word Volts only if it
    appears at the end of the string
    Volts$
    The longest string within parentheses
    The longest string within parentheses but not containing any
    parentheses within it
    ([~()]*)
    A left bracket
    A right bracket
    cat, dog, cot, dot, cog, and so on.
    [cd][ao][tg]
    Frustrating- but still managable.
    Jeff

  • Question about match regular expression

    Colleagues,
    Very stupid question. I would like to get substring between "..." symbols. For example, string 02 July from Explosion occurred on "02 July", 2008.
    How to do this with single Match Regular Expression?
    For example such expression ".*" will give me "02 July":
    But I would like to get it without " symbols!
    I tried this "[~"]*" and this "[~"].*", then read this and this , and all without success... But I'm sure it should be possible. Can you help me?
    Andrey.
    PS
    This regular expression should give exactly the same output as following construction:

    I'm only using 7.0 now, but you can do this with Scan from String...
    %[^"]"%[^"]"%[^"]
    Message Edited by Phillip Brooks on 07-02-2008 02:47 PM
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness
    Attachments:
    NotPCRE.png ‏20 KB

  • Parse Mac Address with match regular expression

    Hi Everyone,
    I have a problem with the Match Regular Expression function,
    I am trying to parse the response two a arp -a 192.168.0.15 request in order to extract MAC address of this remote IP, I used the following RegEx: ^([0-9a-fA-F]{2}[:-]){5}([0-9a-fA-F]{2})$
    I am wondering why do I need to do a string subset first to extract only the MAC Address part. Isn't Match Regular Expression function capable of recognizing the RegEx directly in the middle of a string?
    I only works when I extract the right tring subset as in the picture bellow.
    Thanks for your answers.
    Solved!
    Go to Solution.
    Attachments:
    Mac Address.JPG ‏40 KB

    Get rid of the "^" in the beginning of your regular expression. You are instructing it to find the pattern at the beginning of the string.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Output Column does not have a matching source column in the schema

    Hi Everyone,
                           Can you please help me in this. Already an ETL is loading the data from AS400 TO SQL server. I need to add a new
    column. In the Source (OLEDB source) am pulling the data from AS400 using ADO.NET connection manager.
    New column is added in AS400. To bring the new column from AS400, I added column name in the query in OLEDB source. Test connection is good. In the Source editor, when I click on preview it gives me the values of the new column and if I click on build
    new query also it gives me values for the new column.
    After mapping the columns and refreshing the data in OLEDB destination, I don't see any errors or warnings.
    But when I start executing the package it throws me the below error.
     Error: The output column  (4659) does not have a matching source column in the schema.
    [SSIS.Pipeline] Error: "component  (2861)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
    I need suggestion on this.
    Thanks
    Veeresh

    Hi Veeresh,
    As per my understanding, this error happens when the OLE DB Source component cannot find the corresponding source column in the database table. Possible reason is the the column name in the external database table has changed or
    the column has been removed.
    To verify this issue, please go to the Advanced Editor for OLE DB Source Input and Output Properties tab to see the External columns and Output columns. To fix it, please refresh the data or recreate the Source.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • HT2953 If i purchase CD that does not have iTunes match...how do i get it to play on my devices(e.g.. phone, iPad)

    If i purcharse CD that does not have itunes match...how do i get it to play on other devices(eg. phone, ipad)?

    I go to amazon.com, look up the album in the search bar, the do a copy (right click, copy) on the artwork that shows up.  Then you go to iTunes and right click the album you want to update with that artwork, click "get info" click in the artwork square and press the 'command and V' keys for paste (fyi right click paste does not work here) you must just click in the square and press command-V which will paste it.  It should then place that artwork in the square to update all songs in that album.  Hope this helps...

  • Your computer's timezone does not appear to match your user setting of

    I get this message on a top bar: "Your computer's timezone does not appear to match your user setting of (GMT- 06:00) Chicago. ''Click here'' to update your settings. Alternatively, ''hide'' this message.
    My computer timezone is not Chicago. Why is Firefox giving me this error? Should I just hide it and ignore it? Well, there were a few error with a web app I am developing related to 1 hour off inputs. Something is wrong. Any guesses?

    Figured out the issue and can reproduce it; it has to do with a particular website: support.atlassian.com; one gets there if they have purchased any of the company's products.
    I will let them know and let it go. Thanks :)

  • Multi-line String - Match Regular Expression

    I am trying to figure out the format of a regular expression in order to pull select lines out of a multi-line string and populate those lines as individual elements of a string array while using Match Regular Expression. The overall length of the multi-line string can vary as well as the text contained within the string. The string can contain letters, numbers, and special characters. I have attached an example VI. Within the example VI I only want to return the lines beginning with "Device #" into the array. The number of lines beginning with "Device #" can vary but I want to capture them all.
    Or is there a better function to use instead of Match Regular Expression that will give me the desired outcome?  
    Solved!
    Go to Solution.
    Attachments:
    MultiLine Regular Expression.vi ‏22 KB

    aaronb wrote:
    I am trying to figure out the format of a regular expression in order to pull select lines out of a multi-line string and populate those lines as individual elements of a string array while using Match Regular Expression. The overall length of the multi-line string can vary as well as the text contained within the string. The string can contain letters, numbers, and special characters. I have attached an example VI. Within the example VI I only want to return the lines beginning with "Device #" into the array. The number of lines beginning with "Device #" can vary but I want to capture them all.
    Or is there a better function to use instead of Match Regular Expression that will give me the desired outcome?  
    Match Regular Expression works well for this.
    Ben64

  • Match Regular Expression Function input string format

    Hi,
    I am new to labview and was having some difficulties using the Match Regular Experssion Function.  
    I am using labview to communicate with a sensor.  I have installed the NI device driver to do so.  The output of my sensor is in the format, 
    X20
    R40 P20 A123.  The numbers in this case are arbitrary.  I am trying to use Match Regular Expression Function to display and perform mathematical operations on the numbers.  I am having difficulties formatting the input string on the Match Regular Expression Function.  Could you please give me some tips on how to format the example I provided.  
    Thank

    MoAgha wrote:
    Hi,
    I am new to labview and was having some difficulties using the Match Regular Experssion Function.  
    I am using labview to communicate with a sensor.  I have installed the NI device driver to do so.  The output of my sensor is in the format, 
    X20
    R40 P20 A123.  The numbers in this case are arbitrary.  I am trying to use Match Regular Expression Function to display and perform mathematical operations on the numbers.  I am having difficulties formatting the input string on the Match Regular Expression Function.  Could you please give me some tips on how to format the example I provided.  
    Thank
    Here is a way to do it if the format is constant (X R P A followed by a positive integer number).
    Ben64

  • Data row does not have a matching index row in index

    Dear All,
    While checking Database Consistency, i m getting following error.
    Please Advice
    reagrds,
    Hiten.
    Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
         Apr 14 2006 01:12:25
         Copyright (c) 1988-2005 Microsoft Corporation
         Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
    Msg 8951, Sev 16, State 1, Line 17 : Table error: Table 'fsg.JEST' (ID 451949132). Data row does not have a matching index row in index 'JEST~I' (ID 2). Possible missing or invalid keys for the index row matching: [SQLSTATE 42000]
    Msg 8955, Sev 16, State 1, Line 17 : Data row (3:3447709:85) identified by (MANDT = '009' and OBJNR = 'OR015000015467' and STAT = 'I0010') with index values (MANDT = '009' and STAT = 'I0010' and INACT = ' ' and OBJNR = 'OR015000015467'). [SQLSTATE 42000]
    Msg 8951, Sev 16, State 1, Line 17 : Table error: Table 'fsg.JEST' (ID 451949132). Data row does not have a matching index row in index 'JEST~I' (ID 2). Possible missing or invalid keys for the index row matching: [SQLSTATE 42000]
    Msg 8955, Sev 16, State 1, Line 17 : Data row (4:3526223:65) identified by (MANDT = '009' and OBJNR = 'OV000005347300000001' and STAT = 'I0010') with index values (MANDT = '009' and STAT = 'I0010' and INACT = ' ' and OBJNR = 'OV000005347300000001'). [SQLSTATE 42000]
    Msg 8951, Sev 16, State 1, Line 17 : Table error: Table 'fsg.JEST' (ID 451949132). Data row does not have a matching index row in index 'JEST~I' (ID 2). Possible missing or invalid keys for the index row matching: [SQLSTATE 42000]
    Msg 8955, Sev 16, State 1, Line 17 : Data row (4:3526223:66) identified by (MANDT = '009' and OBJNR = 'OV000005347300000001' and STAT = 'I0052') with index values (MANDT = '009' and STAT = 'I0052' and INACT = ' ' and OBJNR = 'OV000005347300000001'). [SQLSTATE 42000]
    Msg 8951, Sev 16, State 1, Line 17 : Table error: Table 'fsg.S022' (ID 1022587377). Data row does not have a matching index row in index 'S022~A' (ID 2). Possible missing or invalid keys for the index row matching: [SQLSTATE 42000]
    Msg 8990, Sev 16, State 1, Line 17 : CHECKDB found 0 allocation errors and 3 consistency errors in table 'fsg.JEST' (object ID 451949132). [SQLSTATE 01000]
    Msg 8955, Sev 16, State 1, Line 17 : Data row (3:3369530:8) identified by (MANDT = '009' and SSOUR = ' ' and VRSIO = '000' and SPMON = '000000' and SPTAG = '20080913' and SPWOC = '000000' and SPBUP = '000000' and WERKS = '7100' and ARBPL = 'METALST4' and KAPAR = '003' and MATNR = 'JGR0500236G0WL8JH' and AUFNR = '015000015467' and PLNUM = '00000000' and POSNR = '0001' and PLNFL = '000000' and VORNR = '0020') with index values (MANDT = '009' and SSOUR = ' ' and VRSIO = '000' and WERKS = '7100' and ARBPL = 'MMsg 8951, Sev 16, State 1, Line 17 : Table error: Table 'fsg.AFRU' (ID 1166000397). Data row does not have a matching index row in index 'AFRU~ZA1' (ID 31). Possible missing or invalid keys for the index row matching: [SQLSTATE 42000]
    Msg 8955, Sev 16, State 1, Line 17 : Data row (3:3409400:2) identified by (MANDT = '009' and RUECK = '0000223395' and RMZHL = '00000001') with index values (MANDT = '009' and BUDAT = '20080913' and ARBID = '10000042' and AUFPL = '0000053473' and AUFNR = '015000015467' and STOKZ = ' ' and STZHL = '00000000' and RUECK = '0000223395' and RMZHL = '00000001'). [SQLSTATE 42000]
    Msg 8990, Sev 16, State 1, Line 17 : CHECKDB found 0 allocation errors and 1 consistency errors in table 'fsg.S022' (object ID 1022587377). [SQLSTATE 01000]
    Msg 8990, Sev 16, State 1, Line 17 : CHECKDB found 0 allocation errors and 1 consistency errors in table 'fsg.AFRU' (object ID 1166000397). [SQLSTATE 01000]
    Msg 8989, Sev 16, State 1, Line 17 : CHECKDB found 0 allocation errors and 5 consistency errors in database 'FSG'. [SQLSTATE 01000]
    Msg 8958, Sev 16, State 1, Line 17 : repair_rebuild is the minimum repair level for the errors found by DBCC CHECKDB (FSG). [SQLSTATE 01000]
    Job 'SAP CCMS Check Database FSG [20080802184156]' : Step 1, 'Step1' : Began Executing 2008-09-16 03:00:39
    DBCC CHECKDB (FSG) started at Sep 16 2008  3:00AM with Logfile: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\CCMS_CHECK_DB_HIST_2008.txt [SQLSTATE 01000]

    Hi,
    1. Go SE14
    2. Enter table name JEST and press Edit
    3. Click on Indexes Button
    4. Double click on index JEST~I
    5. Click "Delete Database Index" it will delete the index
    6. Now Click "Create Database Index", it will create Database index
    7. Click "Activate and adjust Database" button.
    This way Index recreated as per the table field.
    Repeate above steps for all the indexes which gives error.
    This way you can repair all the indexes which gives error

  • I am trying to print redplum coupons and I can't, help.  I have updated java, adobe flash, and made sure my printer was set on default.  I am not sure what I am doing wrong.  I have contacted redplum and no one will help.

    I am trying to print redplum coupons and I can't, help.  I have updated java, adobe flash, and made sure my printer was set on default.  I am not sure what I am doing wrong.  I have contacted redplum and no one will help.

    No Apple response???  Redplum/Valassis will not help either.  I searched, using the cups error message and though it is Unbuntu, same error so maybe useful...only problem: details would not display unless I join Unbuntu forum.  What a pain to do anything with my Mac or find any help.  I honestly regret buying this buggy OS.
    Anyway, here is what I found, FYI:
    http://ubuntuforums.org/showthread.php?t=483415
    As the old saying goes: when in doubt, consult the manual. The problem appears to be that I added the printer using the KDE Add Printer Wizard. It was automatically given a "socket" URI instead of an "lpd" one. When I:
    - altered the printer settings at http://localhost:631 (the CUPS admin page) as instructed in the manual for the printer, and
    - copied the PPD file into a second place on the hard drive (as instructed on ubunutuforums, see the link above)
    ..everything started working.
    It's still slower than windows, but I can live with that
    Probably a simple fix. Change the socket I.P. to match the printer I.P. like this:
    socket://192.168.1.86:9100. The thing I'm concerned with using socket:// is that AFAIK the printer I.P. must not change. In my case I'm able to assign a static I.P. address to the printer but it's something to consider.
    I found that the only thing I needed to do was change socket to lpd (and remove :9100 off the end as well). See Solving Ubuntu printer “broken pipe” problem (DocuPrint C525A) . BTW thanks for steering me in the right direction - very grateful.      
    Solving Ubuntu printer “broken pipe” problem (DocuPrint C525A)
    Posted on November 25, 2008
    Are you having a problem with your printer under the latest versions of Ubuntu (perhaps it worked under an older version)? Are you able to print short documents, but not longer, or more graphics-intensive, documents? (e.g. the unfortunate people at http://ubuntuforums.org/showthread.php?t=625493). Do they sit there as Processing for ages and then switch to Held? If you have the same problem I had the solution I tried may work for you too. Firstly, check your cups error log:
    sudo gedit /var/log/cups/error_log
    If you see anything like the following, the solution may be simple:
    [Job 201] Unable to write print data: Broken pipe
    PID 13359 (/usr/lib/cups/backend/socket) stopped with status 1!
    System > Administration > Printing and right click on your printer, selecting Properties. Settings > Device URI
    If you see something like socket://your_printer_ip_address:9100 just change socket to lpd and remove the :9100 off the end. Then click on apply.
    Apparently lpd is a more modern protocol which works with most printers whereas socket is more raw (and potentially faster but riskier in a network situation). Somewhere along the line, the default Ubuntu/Gnome setup for networked printers shifted from lpd to socket. Some primitive printers will have benefited whereas a larger number of more modern printers will have suffered.
    Please correct me if I am wrong (which is highly possible) but the underlying problem could be that socket may make the printer wait a long time for a large file to be processed ready for printing. Some printers, such as the Fuji Xerox DocuPrint C525A, may drop the socket if things take too long to start coming through.
    Changing timeout settings might work but lpd is better than socket so it is the preferred solution in any case.
    If this works for you, please leave a comment to let others know (ideally with a description of the printer and Ubuntu version). Printer may be relevant if it doesn’t support the direct stream protocol properly. NB I may take a while to let your comment through because of the volume of spam. Sorry about that.
    Finally, thanks to sphilli8 for the steer in the right direction at http://ubuntuforums.org/showthread.php?p=6245626.
          http://ubuntuforums.org/showthread.php?t=483415

  • My iphone 6plus not working not charge but when i run it the first time working half an hour  when you attempt to run it again light up thr screen and showws the apple logo and after the pice screen illuminates red and does not work what do i do now

    My iphone 6plus not working not charge but when i run it the first time working half an hour  when you attempt to run it again light up thr screen and showws the apple logo and after the pice screen illuminates red and does not work what do i do now

    Hello Nadersalah,
    It seems you're experiencing multiple issue with your iPhone. Based on the information you have provided, it appears your iPhone needs to be serviced. The following link should help you get started with the process and has links with additional information on topics such as warranty and service pricing, battery replacement, and express replacement service.
    iPhone Repair and Service - Apple Support
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

Maybe you are looking for