Regular Expression Search for Case Statement in VBA

Hi,
I'm having trouble trying to use regular expressions in a case statement. I have a CSV spreadsheet of a server's netstat output and am trying to plot everything into Visio. I have been able to do that, however I'm not trying to expand this capability and
resuse the same code for many different servers. 
I have the mainServer variable set as a Variant and in my current example it is set as "INTPXY001" (internal proxy server 001). I have tried different regex statements for the potential to have INTPXY001 - INTPXY999, EXTPXY001 - EXTPXY999, and
SVCPXY001 - SVCPXY999 in place of the Case "INTPXY001", but nothing I have tried seems to work.
'========================================
Set mainServer As Variant
Set AppVisio = CreateObject("visio.application")
AppVisio.Visible = True
AppVisio.Documents.AddEx "", visMSDefault, 0
AppVisio.Documents.OpenEx "server_u.vss", visOpenRO + visOpenDocked
mainServer = ActiveSheet.Cells(1, 2) 'sets mainServer to INTPXY001
With AppVisio.ActiveWindow.Page
Select Case mainServer
Case "INTPXY001"
.Drop AppVisio.Documents.Item("SERVER_U.VSS").Masters.ItemU("Proxy server"), 2.25, 9.25
Case Else
.Drop AppVisio.Documents.Item("SERVER_U.VSS").Masters.Item(("Server"), 2.25, 9.25
End Select
End With
'========================================

You cannot declare variables As Variant in VBScript. All variables in VBScript are implicitly variants.
If you are asking about VBA (Visual Basic for Applications), then you're not asking in the correct forum.
-- Bill Stewart [Bill_Stewart]

Similar Messages

  • Indexing on regular expression seach for dynamic pattern

    Hello All,
    Would it be possible to create any index for regular expression search (REGEXP_LIKE) for 'dynamic' pattern?
    If the pattern is static, then we can create FBI, but is there any way for dynamic patterns? Please advise.
    Regards,
    Hari

    Thanks Dom, I have never used Oracle Text. Would it be possible to provide some sample code for above requirement.
    Regards,
    Hari

  • Match pattern: change regular expression search via front panel?

    Hello,
    I have an application that I am developing which is making use of Serial VISA.
    I am scanning the output of a serial port which is constantly spitting out a long string of data. 
    Data is being pulled from the string with several combinations of SCAN FROM STRING functions and MATCH PATTERN Functions.
    Question:
    How can I use a button or TEXT box on the FRONT PANEL that can change the MATCH PATTERN Functions Regular expression?  
    for example the string may spit out the following:
     Weight\s\s\s\s\s\s\s\s\s\s\s\s-0.00\slb\s\s\s\s\s\s-16\sbits\s+74.40\s\B0F\sCorrected\s\s\s\s\s\s-0.00\slb\s+0.999987\s%\s\r
    in this case the serial device is spitting out data in LB.
    It could be possible for the device to spit out data in KG ... thus I need to change the REGULAR EXPRESSION.
    Thank you for your time

    Hi,
    just a quick example.
    there are other way of doing this but I think the ComboBox is quite an easy one.
    hope this helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    ComboBox.vi ‏12 KB

  • How about the statement of regular expression like for this

    I what to get varians String array by one regular express for the statement like:
    ${user} like play ${game} in ${date}
    I want to get String[] as {"user","game","date"} by one regex, by str.split(regex). I tried many times but always fail to get the result I expected. May it be possible to meet the destination?
    thanks in advance
    Frederick

    why StringBuffer was using here?So one could split the pattern into multiple lines. But it just occurred to me that one could just use string concatenation, which would look better. I don't know why I bothered to use StringBuffefer.
    e.g.:
    String pattern =
        "^" +           // the start of a string
        "(dog)|(cat)" + // match either "dog" or "cat" at the start of the line
        "\\s*" +        // match an arbitrary amount of whitespace
        "$";            // but don't allow anything other than whitespace after dog or cat
    Pattern p = Pattern.compile(pattern);
    Pattern p = Pattern.compile("^(dog)|(cat)\\s*$");> isn't this look more simpler and better?
    In this case, yes. I was looking for a way to make regexps more explicit, with whitespace and comments, for more complicated cases.
    But those double quotes and plus signs add ugliness of their own, so a regexp would have to be pretty complex before it would be an improvement.

  • Regular expression: check for the presence of special characters.

    I have the following requirement:
    I need to check for the presence of the following characters in a keyword: @, #, > if any of these characters are present, then they need to be stripped off, before going further. Please let me know the regular expression to check for these characters.

    I am trying to extend the same logic for the following characters:
    .,‘“?!@#%^&*()-~<>[]{}\+=`©® . here is the code fragment:
    Pattern kValidator = Pattern.compile("[\\.,\\‘\\“?!@#%^&*()-~<>[]{}\\+=\\`©®]");
    Matcher kMatcher = kValidator.matcher(keyWord);
    if (kMatcher.find(0)) {
    keyWord = keyWord.replaceAll("[.,\\‘\\“?!@#%^&*()-~<>[]{}\\+=\\`©®]", " ");
    }I get the following error. This error is from the weblogic command window. I dont understand these special characters.
    Error:
    28 Oct 2008 12:27:48 | INFO  | SearchController   | Exception while fetching search results in controller:Unclosed character class near index
    39
    [\.,\&#915;Çÿ\&#915;Ç£?!@#%^&*()-~<>[]{}\+=\`&#9516;&#8976;&#9516;«]
                                           ^
    java.util.regex.PatternSyntaxException: Unclosed character class near index 39
    [\.,\&#915;Çÿ\&#915;Ç£?!@#%^&*()-~<>[]{}\+=\`&#9516;&#8976;&#9516;«]
                                           ^
            at java.util.regex.Pattern.error(Pattern.java:1650)
            at java.util.regex.Pattern.clazz(Pattern.java:2199)
            at java.util.regex.Pattern.sequence(Pattern.java:1727)
            at java.util.regex.Pattern.expr(Pattern.java:1687)
            at java.util.regex.Pattern.compile(Pattern.java:1397)
            at java.util.regex.Pattern.<init>(Pattern.java:1124)
            at java.util.regex.Pattern.compile(Pattern.java:817)

  • Non-greedy regular expression search/replace

    i want to be able to do non-greedy regular expressions as
    dreamweaver defaults to greedy and eats all of the match it can
    match.
    Is there an add-on to add a checkbox or soemthing in the
    Search and Replace Dialog for non-greedyness?
    i guess i could throw something in there to match some simple
    expressions like...
    text to search n' replace:
    $Query .= ", dateReceived='".addslashes($dateReceived)."'" .
    ", dateReleased='".addslashes($dateReleased)."'";
    Instead of using this now
    Find: '"\.addslashes\(\$([^\)]*)\)\."'
    Replace: ". dateInsert($$1) ."
    i want to just use this wihout it getting greedy with the .*
    Find: '"\.addslashes\(\$(.*)\)\."'
    Replace: ". dateInsert($$1) ."

    In regular expression, if you want the .* to not be greedy
    you add a '?' after so yo you have '.*?'
    Find: '".addslashes($dateReleased)."'
    Hope that help,
    Chris
    Adobe Dreamweaver Engineering

  • Regular Expression Search in Forms Builder

    Hi everyone, can anyone help me out?
    I'm working on a legacy forms migration project (3 to 10g) where item references often do not include the block name.
    eg.
    :stock_level := :default_level;
    instead of
    :stk.stock_level := :ctrl.default_level;
    There are also instances of set_item_property('stock_level',....)
    In complex multi-block forms this obviously makes the form difficult to understand.
    Is there a way in which I can search the triggers and program units of a form for items that don't have a block prefix? The Forms search and replace function has a Regular Expression feature, but I have no experience in this area.
    I assume I'm looking for something like this:- ":", followed by a character string that doesn't contain a "." or "="
    Thanks

    You might have a look at the commercial product formsAPIMaster, it has the ability to do such searches (and also automatic replacements, if needed)

  • How to use REGEXP for case statement

    Hello everyone, I'm very new here and am struggling with a using REGEXP in a case statement, OK I am using the REGEXP to find all strings that match a specific format for a particular brand of product, for example serial numbers, and I need to be able to say something like [case when(xx.brandid) = '123' then if xx.serialnumber REGEXP_LIKE(xx.serialnumber,'[A-za-z][A-za-z][A-za-z]\d{5,}[A-za-z]$') then 'TRUE' else 'FALSE' end "TRUE/FALSE".]
    Help would be greatly appreciated with this as I feel like I'm going backwards trying to figure this out
    Thanks in advance for any assistance.

    Like this?
    case
       when xx.brandid = '123' and
            regexp_like(xx.serialnumber,'[A-za-z][A-za-z][A-za-z]\d{5,}[A-za-z]$') then
          'TRUE'
       else
          'FALSE'
    end

  • How to use regular expression replace for this special characters?

    hi,
    I need to replace the below string, but i couldnt able to do if we use the special charaters '+', '$' . can anyone suggest a way to do this?
    select REGEXP_REPLACE('jan + feb 2008','jan + feb 2008', 'feb',1,0,'i') from dual
    anwers should be :- feb

    you should use escape character \.
    the regular expression will look like as follows:
    select REGEXP_REPLACE('jan + feb 2008','jan \+ feb 2008', 'feb',1,0,'i') from dual
    hope this is what you needed.
    cheers,
    Davide

  • Regular Expression Required for Checksum variable

    I am wanting to create a regular expression that extracts a variable checksum value (cs=) which is unique to a given server response string.
    The issue I am having is that a simple regex being name="cs" value="(.+?)" just does not work because there are 18 different checksum values being returned per session id/server response.
    So a simple regex just picks up any "cs" value and I guess gets confused since there are 18 different ones contained within the server response (all user related)
    What i need is a regex to use say this value from the server response (JONHONEYMAN%40YAHOO.COM) or any other unique value which is contained within the string response from the server then extract the cs (Checksum) value from that string and make it variable :)
    Here is the server response string:-
    "fp=220:1200:2977638312763704:: NO::P1200_EMAIL_ADDRESS,P1200_ORGANISATION_NAME,P1200_UCRN,P1200_ORG_ID,P1200_CALLING_PAGE:JONHONEYMAN%40YAHOO.COM%2C john%20Honeyman%2C260%2C220%2C1190&cs=336788D01EC6E80B1877B3EE982E8B2D8" >Select</td></tr
    can anyone help?
    Thanks

    You need an XML Parser.

  • SAP Query: Caseless search for case-senstive dictionary field

    Hi
    I have a question regarding the select options in a sap query. here is the scenario:
    I have a SAP query + infoset. in the selection sreen I have a field from the type MAKTX. this field is a character field that allows upper and lower case. I have the problem that my users provide an input only in lower case e.g. "bottle" and only find the results where bottle is only in lower case. Results with the word "Bottle" they cannot find.
    I am pretty familiar with abap and programing the code to achiev this is not the problem. I just don't know how I can bring my coding and the sap query together. I had 2 ideas:
    a) I make a z-search help and attach it to my select-option in the selection screen. but I don't know if this is possible and where I do that
    b) I put my code into the code-enhancement section in the infoset. but again I am not sure where I have to put it and if there are any restrictions that I have to know....
    c) any other solution will be good as well... maybe somebody has an idea.
    I hope I could make my problem clear. please let me know if you have any idea how I can do that. I don't want to modify the data dictionary object!!.
    thanks in advance - <offer removed by moderator>.
    thanks a lot
    Alex
    Edited by: Thomas Zloch on Oct 6, 2011 8:57 PM

    Use MAKTG instead, in the selection screen. It's has the same value as MAKTX but it's not case sensitive.

  • Regular Expression Fails for Large Inputs

    I've got a problem on mu RegEx
    This is happenning for only when I input large files to it.
    My code is shown brlow...
    public static boolean isComment(String line) {
    Pattern pattern = Pattern.compile("((?:/\\*(?:--^*|(?:\\*+--*/--^--))*\\*+/)|(?:--.*))", Pattern.CASE_INSENSITIVE);
    Matcher matcher = pattern.matcher(line);
    return matcher.find();
    public static boolean isNewLine(String line) {
    Pattern pattern = Pattern.compile("^[\\s\n]+$", Pattern.CASE_INSENSITIVE);
    Matcher matcher = pattern.matcher(line);
    return matcher.find();
    public static boolean isKeyWord(String line) {
    Pattern pattern = Pattern.compile("^[ \t\n]*(DECLARE|PACKAGE|TRIGGER|PROCEDURE|TYPE|CREATE|ALTER)", Pattern.CASE_INSENSITIVE);^
    ^Matcher matcher = pattern.matcher(line);^
    ^return matcher.find();^
    ^}^
    ^public static String isCTExists(String regEx, String line) {^
    ^Pattern pattern = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);^
    ^Matcher matcher = pattern.matcher(line);^
    ^String s = line;^
    ^while (matcher.find()) {^
    ^s = matcher.replaceAll(replaceCTStr(matcher.group()));^
    ^}^
    ^if (s.equals(""))^
    ^return line;^
    ^else^
    ^return s;^
    ^}^
    ^public static String replaceCTStr(String line) {^
    ^Pattern pattern = Pattern.compile("\\)", Pattern.CASE_INSENSITIVE);^
    ^Matcher matcher = pattern.matcher(line);^
    ^return matcher.replaceFirst("\\)\n/");^
    ^}^
    ^public static String isExists(String regEx, String line) {^
    ^Pattern pattern = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);^
    ^Matcher matcher = pattern.matcher(line);^
    ^String s = line;^
    ^while (matcher.find()) {^
    ^s = matcher.replaceAll(replaceStr(matcher.group()));^
    ^}^
    ^if (s.equals(""))^
    ^return line;^
    ^else^
    ^return s;^
    ^}^
    ^public static String replaceStr(String line) {^
    ^Pattern pattern = Pattern.compile("END[ \t]*;", Pattern.CASE_INSENSITIVE);^
    ^Matcher matcher = pattern.matcher(line);^
    ^return matcher.replaceFirst("END;\n/");^
    ^}^
    ^public static boolean isHaveEnding(String line) {^
    ^Pattern pattern = Pattern.compile("(END[ \t\"A-Za-z_]*;[ \t\n]*)$|([\\)]{1}[ \t\n]*)$", Pattern.CASE_INSENSITIVE);^
    ^Matcher matcher = pattern.matcher(line);^
    ^return matcher.find();^
    ^}^
    ^public static String checkCTMid(String regEx, String line) {^
    ^Pattern pattern = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);^
    ^Matcher matcher = pattern.matcher(line);^
    ^boolean notEnded = false;^
    ^String s = "";^
    ^String temp = "";^
    ^while (matcher.find()) {^
    ^if (matcher.group() != null) {^
    ^if (isComment(matcher.group())) {^
    ^s += matcher.group();^
    ^} else if (isNewLine(matcher.group())) // all the new line characters handled here...^
    ^{^
    ^s += matcher.group();^
    ^continue;^
    ^}^
    ^}^
    ^if (matcher.group(1) != null && !matcher.group(1).equals("")) {^
    ^if (notEnded && isKeyWord(matcher.group(1))) {^
    ^s += "\n/";^
    ^notEnded = false;^
    ^} else^
    ^notEnded = false;^
    ^temp = isCTExists("(\\)[ \n\t\r]*--;--^(?:DECLARE|PACKAGE|TRIGGER|PROCEDURE|TYPE|CREATE|ALTER))", matcher.group(1));
    temp = isExists("(END;[ \n\t\r]*[^/](?:DECLARE|PACKAGE|TRIGGER|PROCEDURE|TYPE|CREATE|ALTER))", temp);
    s += temp;+
    +if (isHaveEnding(matcher.group(1))) {+
    +notEnded = true;+
    +}+
    +}+
    +}+
    +return s;+
    +}+
    +public static void main(String[] args) {+
    +String str = readFile("test.txt");+
    +System.out.println("Read Compleate");+
    +String strWithoutComments = checkCTMid( "(?:/\\*(?:--^*--|(?:\\*+--^/*--))*\\*+/)|(?:--.*)|((?:--^/-++|/(?!\\*)|-(?!-))*+)" , str ); //ok^--
    --^String strWithoutbSlashMiddleEndForCT = isCTExists( "(\\)[ \t\n\r]*--;/--^--$)" , strWithoutComments);
    String strWithoutbSlashMiddleEnd = isExists( "(END;[ \t\n\r]*--^/--$)" , strWithoutbSlashMiddleEndForCT);
    System.out.println(strWithoutbSlashMiddleEnd);
    {code}
    This code is currently parse SQL statements and add '/' characters finding the missed places.
    When i give this 'test.txt' as a long file (with 10000 LOC) gives belov error.
    *Exception in thread "main" java.lang.StackOverflowError*
    * at java.lang.Character.codePointAt(Character.java:2335)*
    * at java.util.regex.Pattern$BitClass.match(Pattern.java:2873)*
    * at java.util.regex.Pattern$Branch.match(Pattern.java:4530)*
    * at java.util.regex.Pattern$GroupHead.match(Pattern.java:4570)*
    * at java.util.regex.Pattern$Loop.match(Pattern.java:4697)*
    * at java.util.regex.Pattern$GroupTail.match(Pattern.java:4629)*
    * at java.util.regex.Pattern$BitClass.match(Pattern.java:2876)*
    * at java.util.regex.Pattern$Branch.match(Pattern.java:4530)*
    * at java.util.regex.Pattern$GroupHead.match(Pattern.java:4570)*
    * at java.util.regex.Pattern$Loop.match(Pattern.java:4697)*
    * at java.util.regex.Pattern$GroupTail.match(Pattern.java:4629)*
    * at java.util.regex.Pattern$BitClass.match(Pattern.java:2876)*
    * at java.util.regex.Pattern$Branch.match(Pattern.java:4530)*
    * at java.util.regex.Pattern$GroupHead.match(Pattern.java:4570)*
    * at java.util.regex.Pattern$Loop.match(Pattern.java:4697)*
    * at java.util.regex.Pattern$GroupTail.match(Pattern.java:4629)*
    * at java.util.regex.Pattern$BitClass.match(Pattern.java:2876)*
    * at java.util.regex.Pattern$Branch.match(Pattern.java:4530)*
    * at java.util.regex.Pattern$GroupHead.match(Pattern.java:4570)*
    * at java.util.regex.Pattern$Loop.match(Pattern.java:4697)*
    * at java.util.regex.Pattern$GroupTail.match(Pattern.java:4629)*
    * at java.util.regex.Pattern$BitClass.match(Pattern.java:2876)*
    * at java.util.regex.Pattern$Branch.match(Pattern.java:4530)*
    * at java.util.regex.Pattern$GroupHead.match(Pattern.java:4570)*
    * at java.util.regex.Pattern$Loop.match(Pattern.java:4697)*
    * at java.util.regex.Pattern$GroupTail.match(Pattern.java:4629)*
    * at java.util.regex.Pattern$BitClass.match(Pattern.java:2876)*
    * at java.util.regex.Pattern$Branch.match(Pattern.java:4530)*
    * at java.util.regex.Pattern$GroupHead.match(Pattern.java:4570)*
    * at java.util.regex.Pattern$Loop.match(Pattern.java:4697)*
    * at java.util.regex.Pattern$GroupTail.match(Pattern.java:4629)*
    * at java.util.regex.Pattern$BitClass.match(Pattern.java:2876)*
    This is not hapenning for small files.
    Can anyone help!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Let's see if I can get this to display as intended: {noformat}(?:/\*(?:[^*]|(?:\*+[^/*]))*\*+/)|(?:--.*)|((?:[^/-]++|/(?!\*)|-(?!-))*+){noformat} Okay, when I try that regex (in EditPad Pro, against the source code of this web page), I see this result: The second alternative, {noformat}(?:--.*){noformat} matches anything from a double hyphen to the end of that line, and the third alternative: {noformat}((?:[^/-]++|/(?!\*)|-(?!-))*+){noformat} matches everything else (up to the next double hyphen, that is). These pages happen to contain a lot of SGML comments, so there are plenty of double hyphens to match. In a large document with only a few double hyphens, it would be easy to blow the stack trying to find the next stopping point.
    What exactly is the isComment() method supposed to do? Are you trying to match a line that consists entirely of a comment, or just a line that contains a comment? And how exactly do you define a comment?

  • Feedback / Submit an idea don't Work (Page not found) || Multiline Regular Expression Search

    Hello,
    I reached for some months an idea with a (multiline edeting, regexp search).
    Nice to see this has already been integrated, making me but disappointing is the regex search, in combination with the Multiline Edeting.
    But what it brings me to use the regexp search, when I cant edit all hits.
    In this feature, I would like to point again.
    But unfortunately I cant find the feedback system, and here in the forum I always get the error message, page not found.
    Beautiful would be if both would be patched;)
    For me, the code is currently the "http://www.sublimetext.com/" editor of my choice if Adobe would therefore produce some its functions, edge code would be a real alternative.
    Yet I find Edge Code is not ready for Daily-use.
    Greetings
    Dirk Persky

    Hi Dirk,
    Thanks for reporting the broken links -- we'll look into that.  As Randy said, you're welcome to just post suggestions & issues here in the forum, though.
    Regarding multiline regexp search: that is possible in Edge Code, with some limitations:
    To search multiple files, use the Find in Files command, and then use any regexp containing "\n" -- it will match the newlines correctly.
    To search a single file, right-click the file and chose "Find In..." (it will behave like Find in Files, but limited to that one file)
    Caveat: you can't use the multiline $/^ anchors in your regexp
    Caveat: there's no workaround for using the Replace command with multiline regexps
    The latest Brackets release 0.41 fixes both the caveats listed above -- though you'll still have to use the "Find In..." workaround (or "Replace In..." for Replace).  We eventually plan to further improve this -- you can watch the full multiline search/replace item on our feature backlog for updates.
    Hope that helps,
    - Peter

  • Regular Expression needed for a password validator

    Business Rules:
    Password must be at least 8 characters
    Contain at least 1 non alpha character and no spaces.
    Here is what I got so far:
      String regex = "(?=^.{8,}$)((?!.*\\s)(?=.*[^a-zA-Z])(?=.*[a-zA-Z0-9]))^.*$";
            String [] password = new String [7];
            password [0] = "H@ffman1";
            password [1] = "hoffman1";
            password [2] = "Hoffman1";
            password [3] = "Hoffman 1";
            password [4] = "hoffman 1";
            password [5] = "hoffmans";
            password [6] = "123456789";
            for(int i=0; i<password.length; i++){
                Pattern pattern = Pattern.compile(regex.trim());
                Matcher matcher = pattern.matcher(password);
    System.out.println(password[i] + " == " + matcher.matches());
    }Output:
    H@ffman1 == true
    hoffman1 == true
    Hoffman1 == true
    Hoffman 1 == false
    hoffman 1 == false
    hoffmans == true // (This is a problem)
    123456789 == true // (This is a problem)

    YoungWinston wrote:
    prometheuzz wrote:
    which is pretty much what our OldWinston suggested...Actually, I was thinking more along the lines of
    System.out.println( password.matches("^[^\\s]{8,}$")
    && password[i].matches("[^a-zA-Z]") );
    (I may have got the number of backslahes wrong; 'always forget that stuff).Ah, I see. But you probably meant:
    password.matches(".*[^a-zA-Z].*")and they're cryptic enough as it is :-).
    Cryptic? Nah...

  • Regular expression help for matching numbers

    Hi,
    I want a exact match of either 9 digits or 12 digits, my query should give "No Match Found" as the input value is actually 10 digit
    select case when regexp_like(regexp_replace( ' 123 4567 890', ' ' ), '^([0-9]{9})|([0-9]{12})$')
    then 'Match Found'
    else 'No Match Found'
    end as test
    from dual;
    Need help, as I must be doing something very basic thing, wrong.
    Regards,
    Ash

    Remove 2 brackets:
    SQL> select case when regexp_like(regexp_replace( ' 123 4567 890', ' ' ), '^([0-9]{9}|[0-9]{12})$')
      2  then 'Match Found'
      3  else 'No Match Found'
      4  end as test
      5  from dual;
    TEST
    No Match Found
    SQL> select case when regexp_like(regexp_replace( ' 123 4567 89', ' ' ), '^([0-9]{9}|[0-9]{12})$')
      2  then 'Match Found'
      3  else 'No Match Found'
      4  end as test
      5  from dual;
    TEST
    Match Found
    SQL>

Maybe you are looking for

  • F-47 request should be approved by higher authority for lesser amt than ask

    F-47 request should be approved by higher authority for lesser amt than asked for only then down payment should be made. they want a list of down payment request which can be edited approved or disapproved by higher authorities The payment clerk shou

  • Unable to Extend Vo

    Hi all , I am trying to extend VO in R12 for that i am getting bellow error Each row in the Query Result Column must be mapped to a unique Query Attribute in the Mapped Entity column. I am not even modified the Base Vo just trying to extend base VO (

  • No sound in timeline

    I sarted a new project. I get sound from all other panels except for the timeline. I can see the UV meters working. I hear sound from the source panel and the project panel. Drag a clip nto the folder icon that will start a new timeline in it's match

  • Delivery address in Purchase Requisition

    Hi While creating a PR (where a contract has been assigned as a source of supply), the Delivery Address in the PR should be picked up directly from the contract. Here in this scenario, I have maintained the delivery address in the contract as differe

  • Where Can i Watch Manny Pacquiao vs Timothy Bradley Live Stream Online

    Where Can i Watch Manny Pacquiao vs Timothy Bradley Live Stream Online Manny Pacquiao vs Timothy Bradley Jr. Live Online game, Manny Pacquiao vs Timothy Bradley Jr. Live HD TV now, Manny Pacquiao vs Timothy Bradley Jr. Live Video, Manny Pacquiao vs T