Regex not matching an expression

Hello, I've just started using regular expressions and I have a question: I've wanted to create a regex which matches all strings starting with <!-- and possibly ending with -->, with the exception that the string --> cannot appear in the middle of the matching text. To do this, I wrote the following pattern:
\Q<!--\E[!(\Q-->\E)]*(\Q-->\E)?I'm quite aware that it's a bad idea not telling the regex what to match, but rather what not to match, as it is very vague and probably inefficient, however, I did expect this to work nonetheless, which it just doesn't. It does match the string "<!--" but no further (i.e, not "<!-- a"). What did I get wrong? (There's probably a much better way to do this, however, as I said, I'm a regex newbie).
thanks,
laginimaineb.

The closes I got was:
"\\Q<!--\\E[^(\\Q-->\\E)]*(?:(\\Q-->\\E)?+)"Which seemed to work well until I tried the last little sample in the below code:
package net.luke;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexEr {
      * @param args
     public static void main(String[] args) {
          //Starts with <!--, then has any characters except --> 0 or more times, and ends with --> 0 or 1 times.
          String pattern = "\\Q<!--\\E[^(\\Q-->\\E)]*(?:(\\Q-->\\E)?+)";
          String[] searches = new String[] {
                    "<!--", "<!-- Hey", "<!-- Hey \n\rThere",
                    "Hey There <!-- You dog --> you.", "Huh <!-- What did --> you say -->?",
                    "I <!-- just need --> to <!-- make up --> some strings.",
                    "But <!-- 123--456>7?-->"};
          Pattern p = Pattern.compile(pattern);
          Matcher m;
          for (int i = 0; i < searches.length; i++) {
               m = p.matcher(searches);
               while (m.find()) {
                    System.out.println(m.group());
Results: <!--
<!-- Hey
<!-- Hey
There
<!-- You dog -->
<!-- What did -->
<!-- just need -->
<!-- make up -->
<!-- 123
-- Edit --
Which, when I clean it up doesn't turn out much different that yours:"\\Q<!--\\E[^(\\Q-->\\E)]*(\\Q-->\\E)?"Edited by: stevejluke on Jul 23, 2008 8:00 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • 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+

  • Regex to match numbers but not characters

    Hey all,
    I brain must not be working right or something but I cannot for the life of me figure out how to get a regex to match numbers, but not characters.
    e.g.
    123456
    would match, but
    123abc
    would not. Essentially what I want to do is take a string and only return a match when the string has numbers but no characters.

    No, it doesn'tYes it does.
    "123abc".matches("\\d+");
    "abc123".matches("\\d+");
    "123".matches("\\d+");
    false,false,trueExcellent example demonstrating the output of a method.
    However the suggestion above was referring to a regular expression, not a method.
    And the above regular expression does match with the following methods
    "123abc".replaceAll("\\d+", "xxx");
    "abc123".replaceAll("\\d+", "xxx");
    "123".replaceAll("\\d+", "xxx");
    The correct regular expression to match only digits is....
    ^\d+$

  • PI 2.0 - virtual express "setup" Fail - The passwords do not match:

    Hi all,
    Since my lab is mostly VM, I was going to upgrade my PI 1.3 to 2.0.  Cisco documentation says the inline upgrade is not supported for the small virtual appliance.  Anyhow, I deployed the new 2.0 Express virtual OVA file, allowing to to use all needed resources.
    To get to the point, when I run through the initial setup/bootstrap, I cannot get past the setting of the admin user's password.  Regardless of what I type, I always get the same message "The passwords do not match".  I can simply type the letter 'a' for a password attempt and am told they do not match.  Only when leaving it blank for the password do I see a message showing a 6 character minimum.  I can type abc123 or whatever basic combination, advanced combination, cases, symbols, numbers, etc.  No matter what I do I cannot make the passwords "match"!
    I have blown away the VM and re-deployed, validating checksum on OVA downloaded, PI-VA-2.0.0.0.294-Express.ova.
    I cannot get past this step.  Has anyone else experienced this or have any input?  I'm not finding anything in my searches.
    Thanks!

    So I was not correct in what fixed my issue.
    So, when I rebooted the host (which contains my MS 2008 DC as well), I had to access my vSphere from my local windows machine client (VM running on Oracle VBox on my MBAIR) through my VPN to my lab. 
    When typing the password Combos from my local Windows VM, I could get past this step.
    When it was time to type the ftpuser/web user (after I performed the initial setup), I again accessed through the vSphere Client loaded on the 2008 DC Virtual Machine running on the same host as the Prime 2.0 Install - same VLAN/etc.  I access this via RDP, then launch vSphere from that DC.
    From that client I was again getting the Passwords not matching.  Only when launching vSphere Client locally (from my local MB AIR VM) was I able to get the passwords to work.
    Bottom line, it seems when accessing vSphere client through an RDP session, using the console feature of vSphere client provided mixed/undesirable results.  When I access console from a vSphere client (non-RDP) it was working fine.
    Just figured I would let you know what seems to be the trigger.
    Thanks Scott!

  • 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

  • Regex to match everything before an underscore

    Hi,
    I am trying to create a regular expression to match part of a file name into a variable but I can't seem to get it to work correctly.
    Here is a sample from gci:
    SERVERNAMEAPPUPP01_Baseline20140220.blg
    SERVERNAMEWWSCOOE3_Baseline20140220.blg
    SERVERNAMEWWSWEB5_Baseline20140220.blg
    SERVERNAMEPNWEBWW01_Baseline20140220.blg
    SERVERNAMEPNWEBWW02_Baseline20140220.blg
    SERVERNAMEPNWEBWW03_Baseline20140220.blg
    SERVERNAMEPNWEBWW04_Baseline20140220.blg
    SERVERNAMEPNWEBWW05_Baseline20140220.blg
    SERVERNAMEPNWEBWW06_Baseline20140220.blg
    SERVERNAMEPNWEBWW07_Baseline20140220.blg
    SERVERNAMEPNWEBWW08_Baseline20140220.blg
    SERVERNAMEPNWEBWW11_Baseline20140220.blg
    SERVERNAMEPNWEBWW12_Baseline20140220.blg
    SERVERNAMEPNWEBWW17_Baseline.blg
    SERVERNAMEPNWEBWW17_Baseline20140220.blg
    SERVERNAMEPNWEBWW18_Baseline20140220.blg
    SERVERNAMEPNWEBWW22_Baseline20140220.blg
    SERVERNAMEPNWEBWW32_Baseline20140220.blg
    SERVERNAMEPNWEBWWI01_Baseline20140220.blg
    SERVERNAMEPNWEBWWI11_Baseline20140220.blg
    LDVWEBWAABEC01_Baseline20140220.blg
    LDVWEBWABFEC02_Baseline20140220.blg
    What I am attempting to do is match from the start of the file name to the underscore(not including the underscore). This part of the file name contains the server name.
    $files = gci E:\CollectedPerfLogs\20140220 -file -name $pattern ='/[^_]*/' foreach ($file in $files){ $file -match $regex $servername = $Matches[0] Write-Host "The server name is $servername" }
    The problem is the regexisn't matching even though
    I verified it in an online regex tester. I would appreciate any assistance in figuring out why this isn't working.

    What's in your $regex variable? That wasn't included in the code you posted. You've also mashed everything onto a single line, which makes it hard to read.
    Anyhow, this value for $regex should work with the rest of your code intact:
    $regex = '^[^_]+'

  • CC user regex - Not Working

    I ran across this thing the other day. http://greatscottgadgets.com/throwingstar/
    $15 for the kit $40 for assembled. I made the same thing for like $.05. Took some cat5E cable, one had a broken end so I cut that off and it become the monitor lead.
    I set it up with a desktop, router, laptop. Ran ping -T to router and captured it all on the laptop.
    Connect 2 systems to the blue cable, the monitor system connects to the gray cable.

    Figured I'dpost info in old threadsand then here...The old CC User Regex allowed me to block unwanted non domain emails from creating Tickets in my helpdesk...That is no longer working...Yes I can use exchange to create rules - but this is a PITA adding "People" to the people list and this is why this regex was implemented I thought...My Version: Version7.4.00070Have no idea when it started - but it was fine about 1/3 years ago.. and haven't had any issues... but haven't needed to worrry... but if a user CCs an outside domain I don't want them on the tickets.Settings Helpdesk SettingsPro Settings OnCC User Regex:reading the tool tip says To & CC users that don't match that express bla bla bla(*@domainabc.com)[email protected] should not have been able to create a ticket... tested with two different accounts from gmail and they walk in...

  • Safari May Not Interpret Regular Expression in Compliance with W3C Standard

    We are troubleshooting why some websites are no longer working when rendered with the Safari 2.0.4 browser. The failure begins when client entered data is validated using regular expressions.
    We have localized the issue to Safari's not interpretting regular expressions consistently.
    For example:
    Does the regex \u00e9 match the literal character é? (Validates the regular expression engine understands Unicode escape sequences for extended characters.)? - NO, but it does on IE and FireFox
    Does the regex \u0041 match the literal character A? (Validates the regular expression engine understands Unicode escape sequences for ASCII characters.)? - NO, but it does on IE and FireFox
    Does the regex é match the literal character é? (Validates the regular expression engine understands literal characters outside the ASCII range – this is against ECMAScript spec.)? - Sometimes, but always on IE and FireFox
    Write a Unicode escape sequence to the screen on the client side. (Validates the string parsing and display in the JS engine works.) - Works on all 3
    Is escape sequence \u00e9 equivalent to literal character é? (Validates the string functionality in the JS engine works with extended characters.)? Yes on all 3.
    Is escape sequence \u0041 equivalent to literal character A? (Validates the string functionality in the JS engine works with ASCII characters.)? Yes on all 3
    Does the regex A match the literal character A? (Validates the regular expression engine understands literal characters in the ASCII range – this is ECMAScript spec.)? Yes on all 3
    Please help. It's hard for me to believe that the regular expression / javascript interpreter(s) for Safari aren't working as they have in the past - but all roads are pointed that way....
    Thank you for your review.
      Mac OS X (10.4.7)  

    We are troubleshooting why some websites are no longer working when rendered with the Safari 2.0.4 browser. The failure begins when client entered data is validated using regular expressions.
    We have localized the issue to Safari's not interpretting regular expressions consistently.
    For example:
    Does the regex \u00e9 match the literal character é? (Validates the regular expression engine understands Unicode escape sequences for extended characters.)? - NO, but it does on IE and FireFox
    Does the regex \u0041 match the literal character A? (Validates the regular expression engine understands Unicode escape sequences for ASCII characters.)? - NO, but it does on IE and FireFox
    Does the regex é match the literal character é? (Validates the regular expression engine understands literal characters outside the ASCII range – this is against ECMAScript spec.)? - Sometimes, but always on IE and FireFox
    Write a Unicode escape sequence to the screen on the client side. (Validates the string parsing and display in the JS engine works.) - Works on all 3
    Is escape sequence \u00e9 equivalent to literal character é? (Validates the string functionality in the JS engine works with extended characters.)? Yes on all 3.
    Is escape sequence \u0041 equivalent to literal character A? (Validates the string functionality in the JS engine works with ASCII characters.)? Yes on all 3
    Does the regex A match the literal character A? (Validates the regular expression engine understands literal characters in the ASCII range – this is ECMAScript spec.)? Yes on all 3
    Please help. It's hard for me to believe that the regular expression / javascript interpreter(s) for Safari aren't working as they have in the past - but all roads are pointed that way....
    Thank you for your review.
      Mac OS X (10.4.7)  

  • Selected file cannot be linked because its type (video) does not match the original file's type

    I've been using Premiere Elements 9 for a couple of years now, and a few months ago I began having problems importing AVI files created from a BlackMagic Intensity Pro capture card.  (These issues were not previously occurring, and since they surfaced, I have exhausted the various settings for the BlackMagic card, used various software such as BlackMagic's own Media Express as well as the freeware VirtualDub, and still have the following problems.)
    In addition, these AVI files play just fine, in their entirety, using Windows Media Player and in Quicktime.
    The problem (or possibly two, but I suspect they could be related) is that most of the AVI files I attempt to import will either (1) import all video and NO audio, or (2) import ONLY a short segment of audio and video, and the length that Elements imports varies.  Usually only in the range of a minute or two.  The rest of the file is not imported at all.
    After much digging in forums, and testing various settings in trying to figure out the issue, I decided to back up all of my files and completely wipe all hard drives and start over with a fresh installation of Windows and Premiere Elements 9.  I haven't installed much else yet, as I wanted to first find out if the reinstallation improved things with Elements.
    For the first project I created in Elements after the reinstallation, Elements successfully imported an entire AVI that was nearly 2 hours long, audio and video.  This was a file that previously would not import properly into Elements.  This suggested that my earlier installation of Elements must have been corrupted somehow.  At this point I was very hopeful that all was well.
    I proceeded to edit the video as I had wanted, saved the project, and exported it to an MPEG format file.  I had originally wanted to export it as an MOV, but I hadn't yet installed Quicktime, so Elements couldn't do that just yet.  The MPEG export was successful and plays fine.
    However, I then installed Quicktime, and once it was finished, I restarted the PC and reloaded the same project.  This time, Elements claimed the media was offline.  I double-clicked on a segment of the video, and directed Elements to the raw file, but then an error message popped up:  "The selected file cannot be linked because its type (video) does not match the original file's type (audio and video)."  This was the same file I had JUST edited and of which I created an MPEG.
    I tried creating a new project and the "Get Media" function to import the AVI again, but this time only the video imported with NO audio.  (This would explain why the error message said what it did, but not why the audio wasn't imported.)
    What in the world is going on with Elements???  I am baffled since the ONLY task I have done on this machine after a complete reinstallation of both Windows and Elements is edit one AVI.  I find it very hard to believe that just installing Quicktime caused this.
    Some info on my system:
    System:  Asus P6T w/ Intel i7 920 and 12 GB memory
    OS: Windows 7 Ultimate
    Video Software:  Premiere Elements 9
    Capture Card:  BlackMagic Intensity Pro (PCI-e)
    Capture Software:  AVIs recorded with either BlackMagic Media Express or VirtualDub (only prior to the reinstallation, as neither of these programs are currently installed)
    I'm getting to the point with Elements that I might need to just abandon it and find something else that is more reliable.  Anybody have suggestions to help with this, so I won't have to migrate?

    mtnsports
    We think that we need to start off with definiting the properties of these .avi files that you are importing into Premiere Elements 9.0/9.0.1 (assumed that you are working for the required 9.0.1 Update).
    You say that the "avi" was created from a "BlackMagic Intensity Pro capture card". What are the properties of this .avi that you imported into Premiere Elements? Not all .avi are created equal. What is the video and audio compression, frame size, frame rate, interlaced or progressive, pixel aspect ratio, typical duration?
    Based on the properties of the video what have you been setting as the project preset?
    Let us start here.
    More later.
    ATR

  • Data type of the base attribute or the base value does not match...

    ...the assigned expression.
    Hello all,
    I always get the Error
    +<ERROR+
    TEXT="'DWH.CUB_REGISTRATIONS_AW.REGISTRATIONS': XOQ-02517: Der Datentyp des Basisattributs oder der Basisgröße stimmt nicht mit dem zugeordneten Ausdruck überein.
    XOQ-01400: Ungültige Metadatenobjekte"/>
    The English message must be something like this:
    The data type of the base attribute or the base value does not match the assigned expression.
    when I run my mapping. The attribute REGISTRATIONS is NUMERIC (12,2) in the Cube and I map a NUMERIC(12,2) constant in it.
    I use a simple OWB-Mapping for loading, but I don't understand why it doesn't function. Other mappings where the attributes are out of a
    table I put in a cube are running well.
    I tried different things, but nothing fixed my problem. Any idea ?
    Thanks a lot for help
    Michael

    Technically this is a 'warning' from the server, not an 'error'. This means that the change you made should have been submitted, but you get an warning message on the client. AWM would suppress this warning, but evidently OWB does not. Can you switch to use AWM?
    Here is the definition of the warning along with 'cause' and 'action' sections. (Unfortunately these sections are not translated into German for some reason.)
    >
    02517, 0, "The data type \"%(1)s\" of the base attribute or base measure is different from the mapped expression \"%(2)s\"."
    // *Cause: Either the base attribute or base measure with the mapped expression was set to an inconsistent data type, or it was mapped to an expression of a different data type from its fixed data type.
    // *Action: When changing a mapped expression for a base attribute or base measure, ensure that the expression has the same data type; otherwise, set the data type of the base attribute or base measure to NULL first. When a base attribute or a base measure has an existing mapped expression, do not set it to a different data type.
    >
    It is probably safe to ignore this warning, but if you can post the relevant XML for the cube, then will probably be able to spot the problem. I assume that REGISTRATIONS is a measure in the cube CUB_REGISTRATIONS_AW, so this is what you can look for in the XML:
    (1) The definition of the base measure along with the datatype. It should be something like this
    <Measure>
      <BaseMeasure
        SQLDataType="NUMBER(12,2)"
        ETMeasureColumnName="REGISTRATIONS"
        Name="REGISTRATIONS">(2) The mapping info for the measure, which should looks something like this:
    <MeasureMap
      Name="REGISTRATIONS"
      Expression="...">
      <Measure Name="REGISTRATIONS"/>
    </MeasureMap>I don't know if you can get the XML directly from OWB. If not, then DBMS_CUBE.EXPORT_XML should work (assuming you are in 11.2). You could also attach AWM and save the cube to an XML template.

  • MacBook pro will not boot up. Blank screen with message File is possibly corrupted. Checksum does not match etc

    MacBook Pro suddenly will not boot up. Blank screen with message File is possibly corrupt. Header checksum does not match, etc

    Hi s.cheslik,
    It seems your MacBook Pro will not boot properly and it displaying an error message. Based on the information you have provided, it appears your MacBook Pro 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.
    Apple - Support - Service Answer Center
    Thank you for contributing to Apple Support Communities.
    Take care,
    Bobby_D

  • Monthly Aggregate Values are Not matching between Two Reports

    Hi,
    I have two custom reports (Pivot Table View)
    _1) National Report_ This report renders data for the 10/11 Season (From 04/01/2010 To 03/31/2011). It includes Monthly Aggregate as well as 10/11 Season Grand Total. This report shows the correct information. We don't have to do any changes.
    _2) YOYOY Report_
    This report renders data for the 10/11, 09/10, 08/09 Season (From 04/01/2008 To 03/31/2011). It includes Monthly Aggregate for each of the three seasons as well as Grand Total for each Season.
    Issue:
    Monthly Aggregate Total for the YOYOY Report is not matching with the National Report Monthly Aggregate Total.
    Technical Background:
    - For 10/11 Season, the expressions used to arrive at the Monthly Aggregate Total is the same.
    - Filter Criteria for (1) Report is specific to 10/11 Season (Rest of the criteria is similar)
    - Filter Criteria for (2) Report is for 08/09, 09/10, 10/11 Season (Rest of the criteria is similar)
    - In Report (1), Date Expressions are based on the following Attributes
    Column Name: Month
    Expression: MONTHNAME(Activity."Created Date")
    Column Name: Sort on Created Month
    Expression: CASE MONTH(Activity."Created Date") WHEN 4 THEN 1 WHEN 5 THEN 2 WHEN 6 THEN 3 WHEN 7 THEN 4 WHEN 8 THEN 5 WHEN 9 THEN 6 WHEN 10 THEN 7 WHEN 11 THEN 8 WHEN 12 THEN 9 WHEN 1 THEN 10 WHEN 2 THEN 11 WHEN 3 THEN 12 END
    Column Name: 10/11 Season
    Expression: /* Metric column name: # of high risk infants identified since last visit */ CASE WHEN "- Activity Custom Metrics".S_INT_10 IS NULL THEN 0 ELSE "- Activity Custom Metrics".S_INT_10 END
    Aggregation Rule: Sum
    - In Report (2), Date Expressions are based on the following Attributes
    Column Name: Month Column
    Expression: Date."Calendar Month"
    Column Name: Sort on Created Month
    Expression: CASE Date."Calendar Month" WHEN 4 THEN 1 WHEN 5 THEN 2 WHEN 6 THEN 3 WHEN 7 THEN 4 WHEN 8 THEN 5 WHEN 9 THEN 6 WHEN 10 THEN 7 WHEN 11 THEN 8 WHEN 12 THEN 9 WHEN 1 THEN 10 WHEN 2 THEN 11 WHEN 3 THEN 12 END
    Column Name: 10/11 Season
    Expression: CASE WHEN Activity."Created Date" BETWEEN /* First Day of Current Season */ timestampadd(sql_tsi_day, -dayofmonth(current_date)+1, timestampadd(sql_tsi_month, -(month(current_date) - 4), Current_DATE)) AND Current_DATE THEN "- Activity Custom Metrics".S_INT_10 ELSE 0 END
    Aggregation Rule: Sum
    Key Information:
    - For 10/11 Season, Activity."Created Date" attribute is used for all the calculations based on date.
    - For 08/09 and 09/10 Season, Date.Date attribute is used for all the calculations based on date. This is because the data was migrated from Asset Record Type to Activity Record Type for these seasons.
    I have tried variety of options and nothing seems to get the Monthly Aggregate matching. Kindly suggest what changes do we require.
    Regards,
    Muddessar Nadeem Alanji
    +91-98456 13180

    Hi,
          Are you saying that you loaded the same excel document to both planning area and cube but the data in both is not matching??
    How did you load the excel data to planning area?
    Can you give more details on what data is not matching? Is the cube value smaller than the value you see in planning book?
    Secondly if you are looking at data, make sure your selections are right. In cube, you have to specify the characteristics and at the bottom of the screen you specify the number of records to be displayed. Increase that to some big number like 9999 so that you can see all the records.

  • In CSM map, can we configure a url not match?

    Hello! Expert,
    Seems we can only configure the url match by "match protocol http url /a/b/*" in CSM, but wonderring if we can configure "not match protocol http url /a/b/*"? checked the docs, could not find the Regular Expression in CSM has "not match" or "!" pattern. However, in our J2EE env. we really need this kind of configuration. Thans, Q.Xie

    Thx Gilles for your feedback, but I don't think this 2 policies method will work for us. The 2nd policy "match any" just likes our default serverfarm. Seems it's hard for me to describe what exactly the issue we have. Could you or some one tell me directly if there is a "not match pattern" in CSM map implementation?
    Thx, Q.Xie

  • 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

  • Sequence does not match type document()

    Hi all,
    I am having a problem with building a query - maybe one of you can point out my mistake!
    First of all I have a sequence of nodes in the variable '$__mpqfEngineVar_13' which are built in a FLWOR using the following construct:
    <engine:document ID='{'NoID'}' recordNumber='{0.0}' Rank='{0.0}' Score='{$__mpqfEngineVar_8}'>{$__mpqfEngineVar_1}</engine:document>
    I am trying to filter out those which have a specific value in a descendant node (actually present inside the tree $__mpqfEngineVar_1 from above):
    $__mpqfEngineVar_15 := ($__mpqfEngineVar_13[/mpeg7:FamilyName = $__mpqfEngineVar_14])
    However I get the following error message:
    Sequence does not match type document() - found item of type element({urn:dimis:mpqfQueryEngine:schema:2009}document, {http://www.w3.org/2001/XMLSchema}untyped)
    If I use the following relative path instead (which is not an option since the path is user define) it actually works (notice the '*')....
    *//mpeg7:FamilyName
    Any ideas what I am doing wrong? Honestly I can't really see the semantic difference..
    Thanks for your help,
    Alex

    Hi Alex,
    The expression "//mpeg7:FamilyName" is an abbreviated XQuery step that expands to this:
    root() treat as document-node()/descendant-or-self::node()/mpeg7:FamilyNameThis shows you why you're getting an error about the root node not being a document node.
    I expect that the expression you really want is ".//mpeg7:FamilyName" - the "." prefix makes it a relative path rather than an absolute path.
    John

Maybe you are looking for

  • How do I set up e-mail with an exchange server?

    My father works as the IT Manager of a small, privately owned company that uses an Exchange Server for e-mail and the like. A co-worker of his recently bought an iPhone 4 and desperately needs him to set up her e-mail to be used on the new phone. Luc

  • Issues downloading free app updates after moving country

    Hi, I've recently moved from Australia to Germany and (stupidly?) updated my iTunes account to reflect that fact. I now keep being told in iTunes that several of my apps have free updates available but when I try to download them, iTunes store tells

  • Format a query in a special way

    Hello all, I have two tables, one with car brands and the other with models and they are put together with a view like this: ID Car_Brand Car_ID Model Model_ID Existing 1 Dodge 100 Sport 124 1 2 Dodge 100 Estate 125 0 3 Dodge 100 Off-Road 126 0 4 Hon

  • Invoice for subcontractor ?

    I have a doubt regarding subcontraction cycle, I have tested one scenario for the same as, 1.Created a PO, having Item category L, ticked and maintained the SC Vendor in the delivery address tab and Maintained the component in the Material tab pages

  • How to solve the problem of my boomarks disappearing?

    Since I upgraded to firefox 4. My bookmarks keep disappearing. I tried the solutions in the lost bookmarks section but that didn't help. Should I just uninstall firefox 4 and reinstall from scratch?