• RELEVANCY SCORE 4.54

    DB:4.54:Regular Expression Limit To 10digits [A-Za-Z0-9]+ zd





    Hi
    I have a regular expression [a-zA-Z0-9]
    i want to limit the expression by setting max length to 10 digits or 10 numbers
    can any one help to complete the regular expression ?

  • RELEVANCY SCORE 4.41

    DB:4.41:Regular Expression To Limit 10 Digits [A-Za-Z0-9]+ as





    Hi
    I have one regular expression [a-zA-Z0-9]
    i want to make max length of the expression to 10
    can any one help on this to complete the regular expression

    DB:4.41:Regular Expression To Limit 10 Digits [A-Za-Z0-9]+ as

    Howis @^[\w\.]{2,20}$ supposed to answer the question?

  • RELEVANCY SCORE 3.59

    DB:3.59:Need Regular Expression k8





    I need a regular expression with following validations:
    1. needs to be 34 digit
    2. 16th 17th digits must be 7 and 6.
    Please send me the expression. thanks in advance

  • RELEVANCY SCORE 3.58

    DB:3.58:Regular Expression Question c8


    I don't do well with regular expressions and this is a little above me. I am iterating through files in a directory and I need to find the files matching a couple patterns.
    2222-2222.txt 4 digits 1-9 then a dash then 4 digits 1-9 with .txt extension
    ID2222-2222.txt CHARACTERS ID then4 digits 1-9 then a dash then 4 digits 1-9 with .txt extension
    2222Q2222.txt 4 digits 1-9 then a Character U then 4 digits 1-9 with .txt extension
    Any help with this would be greatly appreciated
    Tim

    DB:3.58:Regular Expression Question c8

    Maybe you don't have an hyphen. It could be a dash.
    Hyphen: 2222-2222.txt
    En-dash: 22222222.txt
    Em-dash: 22222222.txt

  • RELEVANCY SCORE 3.50

    DB:3.50:Regular Expression To Restrict Some Characters k3


    I want regular expression that will not allow and characters.

    Regards,
    Jaydeep

    DB:3.50:Regular Expression To Restrict Some Characters k3

    Found the solution. ^[^^] *$

    Regards, Jaydeep
    Your expression is wrong the ^ character in the set braces [ ] is an attribute used only once. Your pattern could be changed to ^[^]+$ Which says from the beginning of the line ^ to the end $, look for this set 1 or more times (+) and to allow all characters except . When you specified [^^] that set included the caret character ^ in the items to not allow. Subtle....William Wegerson (www.OmegaCoder.Com)

  • RELEVANCY SCORE 3.37

    DB:3.37:Digits Of Precision Limit To 3 Significant Digits a9



    Hello!

    I need 3 signifcant digits. If I choose 13 digits, it gives me 2 places. If I choose 14, it gives me all places. Can you please see the attached VI and help me? I need 3 decimal places. Is this possible?

    Thanks







    Solved!
    Go to Solution.

    DB:3.37:Digits Of Precision Limit To 3 Significant Digits a9


    every numeric indictaor, control, constant has this tab

    this is AFAIK only representation, but i am not sure

  • RELEVANCY SCORE 3.35

    DB:3.35:Simple Regular Expression ks


    Hi,

    I'm trying to write a regular expression using the regex package that will simply match strings which are comma separeted integers, which are possibly negative. So it should match things like:
    1
    1,2
    1,2,3
    -1,3,-2
    etc

    The expression I've got at the moment is:
    -?[0-9]+[,-?[0-9]+]*

    i.e Possibly a -, followed by 1 or more digits, followed by zero more occurences of (a comma, possibly followed by -, followed by 1 or more digits).

    However, this expression also matches things like:
    1,
    1,2,
    etc.

    Any ideas on why it is matching strings that finish with a comma, and how to stop it doing this?

    Thanks,

    Jim

    DB:3.35:Simple Regular Expression ks

    the regular expression has a flaw

    consider [a b c]
    this regex matches the occurance of either a or b or c .
    so in your expression use ( ) instead of [ ]

    try this..

    -?[0-9]+(,-?[0-9]+)*

  • RELEVANCY SCORE 3.27

    DB:3.27:Deleting Files (Based On Regular Expressions) 3f


    I want to delete all files from my Java program that match the regular expression foo[0-9]* where n may be an optional digit, or digits but I just don't know how to get a list of all files that match the regex. Any ideas?

    DB:3.27:Deleting Files (Based On Regular Expressions) 3f

    I'm going to give you a little example,not how to delete the files(this is very easy) but how to find the files you want,based on the specific regular expression
    You have to create two files:FileNameFilter.java and MadBull.java :-)

    import java.io.*;
    class FileNameFilter implements FilenameFilter
    {
    String name;
    String extension;
    FileNameFilter(String name,String extension) {
    this.name = name;
    this.extension = extension;
    }
    public boolean accept(File pathname,String fileName) {
    boolean harris=true;
    if(fileName!=null)
    harris=fileName.startsWith(name);
    if(extension!=null) {
    if (extension=="*")
    harris=true;
    else
    harris=fileName.endsWith(extension);
    }
    return harris;
    }
    }
    --------------
    import java.io.*;

    class MadBull
    {
    public static void main(String[] args) {
    File milan = new File("d:/javaprogs/x");
    int start = 2;
    int end = 9;
    FileNameFilter[] harris = new FileNameFilter[end - start];
    for(int i=0;iharris.length;i++) {
    harris=new FileNameFilter("bullardole"+start,"*");
    start++;
    File[] file = milan.listFiles(harris[i]);
    for(int j=0;jfile.length;j++)
    System.out.println(file[j]);
    }
    }
    }

  • RELEVANCY SCORE 3.27

    DB:3.27:Regular Expression To Validate User Input String Yy-Nnnnn cx



    Hello,
    I am new to regular expressions. I am trying to validate an user input for a field. The allowed input should be YY-NNNNN
    YY should be the year. valid examples are 08, 09, 10, 11 
    NNNNN should be 5 (and only 5) numeric digits. 
    Valid values are 09-16529, 09-13428, 09-96723
    Invalid values are 09-2390, 09-145890, 10-s8923
    The validation is being done in J# (to be used by Java and C# code).
    I am trying the following regular expression to validate the user input
     [0-1][0-9]-[0-9][0-9][0-9][0-9][0-9]
    The above expression allows YY until year 19, that should be good enough (for another 10 years). Users shouldn't really be entering the old years data such as 99, 98 etc.,
    Is this the correct way to validate the user input? if you guys can suggest any better way, I would appreciate your help.
    Also please make sure the suggested regex should be good for both Java and C#.
     
    Thanks a lot. 

    DB:3.27:Regular Expression To Validate User Input String Yy-Nnnnn cx

    ^\d{2}-\d{5}$Use Regex wisely. It determines format. If you have other stipulations, maybe you should limit how the user populates fields.

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com

  • RELEVANCY SCORE 3.17

    DB:3.17:How To Define Number Of Match In Regular Expression For Match Regular Expression Function? d1



    Hi,

    I am trying to use Match Regular Expression function to check if string matches certain format, say 5 charactars and 6 digitals. How to define it in regular expression?

    Format [A-Z]+[0-9]+ will not limit the number of matches.

    I can do [A-Z][A-Z][A-Z][A-Z][A-Z][0-9][0-9][0-9][0-9][0-9]​[0-9], but any better way?

    Thanks for any help.

    Anne

  • RELEVANCY SCORE 3.14

    DB:3.14:Regular Expressions mj


    I have used an appending scheme with key codes in collections. so it looks like this:1298742374 123 , and 1298742374 129, etc with always a space between the twoidenticle 10 digits and the unique append at the end. I need to know how to use a regularexpression to extract ALL objects with the same first 10 digits from the Collection regardless of their unique append to the first 10 of this key code. So in the above example I need both objectsextracted with one elegant statement...
    like if(collection.contains(1298742374 + [regular expression]) then....
    my thinking is that a .contains will not work predictably since more than one match might occur.

    DB:3.14:Regular Expressions mj

    Hi Mike,
     
    The language feature your looking for doesn't exist in .NET but you could write you own, obviously, but what I mean is you can write extension methods that add methods to existing classes. What you could do, and it's a little long winded in VB.NET, is write a method.....
     
    Function Contains(start as string, pattern as string) as Boolean
     
    and then make it an extension method of collection.... the method itself would be straight forward, split the string on space, ..... I'll just write it....
     
    Imports System.Runtime.CompilerServices
    Imports System.Text.RegularExpressions
     
    Public Module IListExtensions
     
        Extension() _
        Public Function Contains(ByVal items As List(Of String), ByVal part1 As String, ByVal part2Regex As String)
            Dim result = From item In items _
                         Where (item.Split( )(0) = part1 And _
                                Regex.IsMatch(item.Split( )(1), part2Regex))
            Return result.Count 0
        End Function
     
    End Module
     
    When you import IListExtensions any List(Of String) object you have will have a new Contains method.... I know this is C#, sorry about that, but you should see how it works from that.
     
                Liststring data = new Liststring();            data.Add(1298742374 123);            data.Add(1298742374 129);
                bool result = (bool)data.Contains(1298742374, @1\d{2});            Assert.IsTrue(result);
     
     
     
     
     
     

  • RELEVANCY SCORE 3.13

    DB:3.13:Regular Expressions kp



    Bertrand,Is there an upper limit on how long a regular expression can be in size?Is there a "NOT" regular expression, like "!"? (I did not see it in the docs.)jrhayes

    DB:3.13:Regular Expressions kp


    Unfortunately, Application Sentry uses the PSL grep() function. This explains why it does not support the ! (NOT) operand.But using the second string with the "do not contain" option shouldn't slow down the processing so much. For some performance purpose, we do a grep(string) on each line of the parsed text and not on the whole text at one time (do you follow me?). Therefore, making an additional grep on each line shouldn't be very time-consuming.I just hope it's going to work for your case ;-)Cheers,Bertrand

  • RELEVANCY SCORE 3.12

    DB:3.12:Combining Validations s9


    I have a field, PHONE, that I see through a dblink to the IVR database. I need to have that number be between 10 and 15 digits, and I need it to EITHER have the 4th digit be zero or the first two digits be 99. I can make individual validations that will work individually, but if I try to run them together, they naturally conflict and I can't save the record.

    These are my regular expression type validations:

    ^[[:digit:]]{3}?[0. ][[:digit:]]{6,11}$

    and

    ^[9. ][9. ][[:digit:]]{8,13}$

    How can I combine the two into a single validation so that it will run either/or?

    DB:3.12:Combining Validations s9

    Bonnie,

    Glad to be of help. :) RegEx is not my domain though :D

  • RELEVANCY SCORE 3.11

    DB:3.11:Regular Expression Limits? 78



    I have been working with some class maps and such in the ASA 5505, versions 8 and 9.

    Is there a limit to the number of regular expressions you can define, and if so, what is that limit?

    Thanks in advance, Ken

    DB:3.11:Regular Expression Limits? 78


    I have been working with some class maps and such in the ASA 5505, versions 8 and 9.

    Is there a limit to the number of regular expressions you can define, and if so, what is that limit?

    Thanks in advance, Ken

  • RELEVANCY SCORE 3.07

    DB:3.07:Regular Expression ss


    Hi all,
    How to validate FileZilla_3.3.5.1(1)Eng using regular expression using C#.net?
    Thanks
    Divakar

    DB:3.07:Regular Expression ss

    If you find a reply as answer to your question, please mark it as Answered .

  • RELEVANCY SCORE 3.06

    DB:3.06:Regex: Help Needed On Backreferences For Nested Capturing Groups mm


    Hello, everyone

    I'm confused with backreferences for the nested capturing group(s). Can anyone help me out to understand it?
    Well, I knew that the following regular expression would match any 2 digits, followed by the exact same two digits:

    (\d\d)\1BUT, how about a nested capturing group? How would it be evaluated?

    (\d\d(confused))\2In the expression (\d\d(\d)), there are two groups:
    1.itself, (\d\d(confused))
    2.nested group, (confused)

    And, *\2* here specifies that is the second pattern (confused) that I want to use for matching? Urr.... totally confused.

    Edited by: Jay-K on Mar 10, 2010 3:39 PM

    DB:3.06:Regex: Help Needed On Backreferences For Nested Capturing Groups mm

    Jay-K wrote:
    Thank you for your help!
    I do really appreciate it.^^You're welcome.

  • RELEVANCY SCORE 3.05

    DB:3.05:Regular Expression For A Version 7x


    Hi
    I am looking to construct a regular expression for the .NET Version for a string variable.
    The supported values are:
    1.2
    1.2.3
    1.2.3.4
    Each part of the version can only take upto 7 digits.
    Can any one help on this?
    Thanks
    Sahasra

    DB:3.05:Regular Expression For A Version 7x

    Correct. TryParse was added in v4. Prior to that you'd have to use Parse or the ctor wrapped in a try-catch.

  • RELEVANCY SCORE 3.00

    DB:3.00:I Want A Regex For Decimal(10,4) 1j



    Hello msdn,

    I want a regular expression for Decimal(10,4), means Maximum 10 digits, after decimal point(only 4 allowed). How can I write Regex for this?

    Could anyone help me with a sample regex?

    Regards

    Salam

    salampv.07salampv.07

    DB:3.00:I Want A Regex For Decimal(10,4) 1j

    Hello
    Koopakiller,
    Thank you very much for sharing the info, It working perfectly fine.
    But I found an Alternative solution. Thank you very much for the help .

    My Solution is :
    \d{1,10}\.\d{1,4}
    and the method is

    public string GetDecimalRegEx(int precsion, int scale)
    {

    return @\\d{1,precsion@}\\.\\d{1,scale};

    }

    Thank you very muchsalampv.07

  • RELEVANCY SCORE 3.00

    DB:3.00:2b Or Not 2b? A Regular Expression Problem 3p



    I am seeking to understand my error in the attached VI. The LV help states the following regarding usage examples:

    A sequence of one or more digits
    [0-9]+

    One or more characters other than digits
    [~0-9]+

    So why does my code return the exact same result for both the positive and negative cases?

    Thanks.










    Attachments:






    re problem.vi ‏55 KB

    DB:3.00:2b Or Not 2b? A Regular Expression Problem 3p

    kc64 wrote:
    The LV help states the following regarding usage examples:

    One or more characters other than digits[~0-9]+
    Where does it say this in the LabVIEW Help? My LabVIEW Help says this:
    One or more characters other than digits [^0-9]+

    EDIT: It appears that the the LabVIEW 8.5 Help has the line as kc64 noted, while the LV 8.6 Help has the line I mentioned.

    Message Edited by smercurio_fc on 04-24-2009 01:57 PM

  • RELEVANCY SCORE 2.99

    DB:2.99:Expression For Checking Decimals k3


    hi   i need the regular Expression for the following condition. it need to check the decimal number. Infront of the decimal any number of values are allowed but after the decimal the only two digits are allowed.Like 1256.36            125.36        1489755.69        56.36    I had used the Expression [0-9].[0-9]{2}but its allowing more than twodigits after the decimal like 158.3699. help me Regarding this. I am using .Net2003 windows application.

    DB:2.99:Expression For Checking Decimals k3

      You can use or \b to end the string or negate the trailing numbers:1. [0-9]*\.[0-9]{2}\b2. [0-9]*\.[0-9]{2}$3. [0-9]*\.[0-9]{2}[^0-9a-zA-Z]Adam

  • RELEVANCY SCORE 2.99

    DB:2.99:Regularexpression Validator j9


    Hi

    I needed help to write the regular expression validator. I needed to write one expression which can validate the following expression (All the following are valid expressions)

    991231223=5667=1234512 BW 1552 OR 7810 AND 15=150 AND =250=10 OR 100=10 OR 010 OR =250

    DB:2.99:Regularexpression Validator j9

    You could instead use a custom validator so that you can use the same code to validate the expression as to parse it.
    --
    Andrew

  • RELEVANCY SCORE 2.99

    DB:2.99:Text Message To A None 10 Digits Phone Number kx


    Hey Guys,
    This might sound silly but does any one here knows why I can't send text to a none 10 digits number ?

    Every time I try it I get an error back but there is no issue when I send it to a regular 10 digits number. I'll appreciate any info provided.

  • RELEVANCY SCORE 2.99

    DB:2.99:Regular Expression For Phone Numbers [Both U.S. And International] mk


    If no + then assume U.S. format and store xxx-xxx-xxxx as the default format.Allow (xxx) xxx-xxxx or xxx-xxx-xxxx or xxx.xxx.xxxx or (xxx) xxx xxxx or xxx xxx xxxx If +sign then assume International phone and store as +xx-xx-xxx-xxx (Country + AreaCode + Phone)Allow+[2]-[2-4]-[3-4]-[3-4]  i.e +[2igits]-[2 to 4 digits]-[3 to 4 digits]-[3 to 4 digits]+[2] [2-4] [3-4] [3-4]  i.e.+[2igits] [2 to 4 digits] [3 to 4 digits] [3 to 4 digits]

    DB:2.99:Regular Expression For Phone Numbers [Both U.S. And International] mk

    International: \+\d{2}-\d{2,4}-\d{3,4}-\d{3,4}
    US: \({0,1}\d{3}\){0,1}[- \.]\d{3}[- \.]\d{4}
     
    Together: (\({0,1}\d{3}\){0,1}[- \.]\d{3}[- \.]\d{4})|(\+\d{2}-\d{2,4}-\d{3,4}-\d{3,4})
     
    Adamus

  • RELEVANCY SCORE 2.99

    DB:2.99:How To Use Special Characters In Regular Expression 3m


    HI all, I am new to regular expression.
    Can any one please tell me the regular expression for characters which are used in regular expression like " [({. tetc.Is there any particular expression to prefix before using these characters

  • RELEVANCY SCORE 2.98

    DB:2.98:Regular Expression Needs Help...And So Do I 3z


    Hi,
    I'm trying to validate an input string using Regular Expression syntax and need some help. The input string can either start with the uppercase letters RE followed by exactly 9 digits, or the input string can simply be exactly 10 digits in length.
    So...either RE123456789 or 0123456789
    I'm using C# and this is what I have so far:
    ^[RE0-9]\\d{9}$

    DB:2.98:Regular Expression Needs Help...And So Do I 3z

    Yes that works perfectly Ron...many thanks for you help!
    (and thanks for the suggestion about ExpressoBob, I'll definitely check it out)

  • RELEVANCY SCORE 2.98

    DB:2.98:How To Give These Regular Expressions zz


    Example Number: 789985641D(Have 9 digits and the last one is always D)how to illustrate this kind of a thing using regular expression(This doesn't work for me)string strRegex = @[0-9]{9}D;-------------Example Number: 6396541237(Have 10 digits)how to illustrate this kind of a thing using regular expressionTried like this.....but it allows more than 10 digits.hw to restrict it to  exactly 10 digits.
    string strRegex = @[0-9]{10};

  • RELEVANCY SCORE 2.98

    DB:2.98:Regarding Office Mail Id p1


    Hi all,I am new to asp.net programming so please help me out in validating using regular expressions..I have a query regarding the regular expressions like my company is abc and the person should enter in this format only anyname@abc.com and @abc.com should be common for any employee..How can we do that??also for indian mobile numbers there are only 10 digits so if a user enters 9 digits then my application should display a warning message for correcting the value in the mobile number field How can we do that?/Any suggestions please thank ui have used [0-9] in my regular expression but that is not working...Thanks in advance,Karthik.

  • RELEVANCY SCORE 2.94

    DB:2.94:Dimension Limit Total Along With Expression Total mp



    Is there a possibility to get dimension limit total on a staright table ?

    ex: if i have selected dimension limits show only lagest 10

    i want to see total for top 10 and also expression total ... is this a possible scenario ?

    DB:2.94:Dimension Limit Total Along With Expression Total mp


    Thankyou for your time, i did the same when user wanted to control the top list in a pivot table. but this is different from the issue listed here. i prefer not to go with calculated dimensions as they are not cached in memory.

  • RELEVANCY SCORE 2.93

    DB:2.93:Regular Expression Help j7


    Hi Guys,

    I need some help with regular expression that I am trying to create.
    What I am doing is extending the PlainDocument and creating a DecimalDocument class.

    In this class I have specified a regular expression that formats my number as follows:-

    the regex is ^\d+(?:\.\d{0,2})?$
    Input: 1234567.9
    Output: 1234567.90

    I was wondering is there a way to get the regex to insert comma's into the digits before the decimal place as follows and recognise the comma is the user inserted them.
    Input:1234567.9
    Output: 1,234,567.90

    Help would be very much appreciated,
    Thanks,

    DB:2.93:Regular Expression Help j7

    It sounds to me like you need to use something like Rewriter
    http://elliotth.blogspot.com/2004/07/java-implementation-of-rubys-gsub.html
    where you would detect the numbers, parse them then use DecimalFormat to create the updated value to the format you require (including commas).

    This would take about a dozen lines of new code.

    Message was edited by:
    sabre150

    I'm fealing generous today
    import java.text.*;
    import e.util.*;

    public class Fred902
    {
    private static class NumberFormatRewriter extends Rewriter
    {
    private final DecimalFormat formatter = new DecimalFormat("#,##0.00");

    private NumberFormatRewriter()
    {
    super("\\d+(?:\\.\\d*)?");
    }

    public String replacement()
    {
    double value = Double.parseDouble(group(0));
    return formatter.format(value);
    }
    }

    public static void main(String[] args) throws Exception
    {
    Rewriter rewriter = new NumberFormatRewriter();
    String line = "One = 4217.3 Two = 123456 Three = 4.21";
    String formattedLine = rewriter.rewrite(line);
    System.out.println(formattedLine);
    }
    }Message was edited by:
    sabre150

  • RELEVANCY SCORE 2.93

    DB:2.93:Match Characters And Capture 1a


    I need a regular expression that will allow me to match and capture 1 or 2 characters and 5 or 6 digits.
    Examples:
    single specific character plus 6 digits, such as
    A123456
    E867530
    The first character must be A or E.
     
    or two specific characters plus 5 digits, such as:
    BZ09816
    WC56728
    The first two characters must be BZ or WC.
     
    Thanks, Mike...

    DB:2.93:Match Characters And Capture 1a

    Forgot to mention that the input could contain other text.  Removed the ^ and the $ and this worked.
    Thanks Sergie

  • RELEVANCY SCORE 2.93

    DB:2.93:Cutting A String In Two Digits Pairs? 1z


    I have a String like this, say 01310716222516. I want to convert this to letters using some rules (01:A, 02:B...up to 31:[']). How can I do that? I usually use StringTokenizers to analyse a String but there's no regular expression here...
    Thanks

    DB:2.93:Cutting A String In Two Digits Pairs? 1z

    a couple problems...
    String are immutable. meaning, theyre
    unchangeable.
    any "changes" result in a new String being returned.
    you need to do:
    String whatever =
    decrypted.concat(encoder[Integer.parseInt(num1)-1]);Ah yes, decrypted=decrypted.concat(...) works.. it's 6am here excuse me :D

    Second, you arent indexing the String correctly
    String num1 = numbers.substring(0, 2);
    it should be
    String num1 = numbers.substring( i*2, (i*2) + 2);Ah will be better (my solution works too, because I cut numbers with substring(2) but it's a bit dirty.
    Thanks again :)

  • RELEVANCY SCORE 2.92

    DB:2.92:Regular Expression For A Decimal With A Precision Of 3. 78



    Hello,

    Can someone please suggest what would be the regular expression for a decimal with a precision of 3? I have tried following but does not do anything.

    var regExpDec = / ^ ([0-9]{0,3})+(\.[0-9]{1,3})?$/ ;

    var vMatched = this.rawValue.match(regExpDec);

    this.rawValue =null ;

    xfa.host.messageBox("Enter the following format:999.999", 3, 0);

    xfa.host.setFocus( this );

    }

    I have Pattern set for Display, Edit and Validation as num{zzz9.zzz}. Do I still need to Limit Leadiing Digits and Tailing Digits on the Object properties?

    I need to be able to enter following :

    ["123.123", "2", "56754", "292.123", "0.21", "3.1"]

    Thank you.

    if

    DB:2.92:Regular Expression For A Decimal With A Precision Of 3. 78


    Here is the solution. I've changed decimal field to text field and placed following code on exit.

    var regExpDec = /^\d{0,3}\.\d{0,3}$/ ;

    var vMatched = this.rawValue.match(regExpDec);

    this.rawValue
    = null;

    xfa.host.messageBox("Enter the following format : 999.999" ,"CAS No.", 3, 0);

    xfa.host.setFocus( this);
    }

  • RELEVANCY SCORE 2.92

    DB:2.92:Confused By Regex 8p


    Hi everyone,

    Hopefully this is a question quickly answered. I'm using a regular expression validation on a text field. I want the user to be able to enter between 0 and 15 digits, followed optionally by a decimal point '.' and between 0 and 5 digits.

    \d{0,15}(\.\d{0,5})?

    However, the validation does not return false when I enter 16 digits followed by a decimal point and five numbers. Could anyone point me in the right direction?

    Thanks heaps,

    Kieran

    DB:2.92:Confused By Regex 8p

    Okay, so I forgot the leading ^ and trailing $!

    Crisis averted, sorry anyone who looked ^_^

  • RELEVANCY SCORE 2.90

    DB:2.90:What Is The Regular Expression For T1234567893 In Sap? 7z



    Hi,

    I would like to search for T1234567893 in a string with FIND ALL OCCURENCES OF REGEX....

    T never change but the following 10 digits do.

    I have tried this and it didnt work: T*[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]

    Thanks.

    DB:2.90:What Is The Regular Expression For T1234567893 In Sap? 7z


    DEMO_REGEX_TOY is the best way to learn regular expressions in ABAP.

    I would like to mention an alternative to get the match.

    Expression (T\d{10}) would match T1234567893 and give same thing as submatch, whereas T(\d{10}) would match T1234567893, and return submatch as 1234567893.

    Maria Margy

    Parenthesis ( ) are used to get enclosed part of pattern as submatch.

    Curly brackets { } are used to specify the number of occurrences. Patterns [0-9][0-9][0-9], \d\d\d , \d{3} are same.

  • RELEVANCY SCORE 2.90

    DB:2.90:How To Form A Regular Expression For Matching The Xml Tag? 7s


    hi i wanted to find the and match the xml tag for that i required to write the regex.

    for exmple i have a string[] str={"dataabc/data"};
    i want this string has to be splitted like this data, abc and /data. so that i can read the splitted string value.

    the above is for a small excercise but the tagname and value can be of combination of chars/digits/spl symbols like wise.

    so please help me to write the regular expression for the above requirement

    DB:2.90:How To Form A Regular Expression For Matching The Xml Tag? 7s

    your suggestion is most appreciable if u can give the startup like how to do this. which parser is to be used and stuff like that

  • RELEVANCY SCORE 2.89

    DB:2.89:How To Use Regular Expression To Find String dd



    hi,

    who know how to get all digits from the string "Alerts 4520 ( 227550 ) ( 98 Available )" by regular expression, thanks

    br, Andrew

  • RELEVANCY SCORE 2.89

    DB:2.89:Regular Expression x8


    Hi,

    Does anyone know a regular expression that will limit the entry to a text box to characters from A to Z 0-9 and does not allow white space.

    Thanks.

    DB:2.89:Regular Expression x8

    Excellent, how do I disallow the entry of whitespace?The expressions posted by uncle alice doesn't allow space.

    Kaj

  • RELEVANCY SCORE 2.89

    DB:2.89:Visual Basic Modulus Operator 8a


    Hi
    I tried a mini encryption with the modulus operator but now I can't DECRYPT what I encrypt.
    How do I use the modulus operator to decrypt this:

    Public Class Encryption

    Private Sub btnEncrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEncrypt.Click
    'Encrypt digits entered by user

    Dim Digits As Integer
    Dim W As Integer
    Dim X As Integer
    Dim Y As Integer
    Dim Z As Integer

    Digits = txtDigits.Text

    Z = Digits Mod 10
    Digits = Digits \ 10

    Y = Digits Mod 10
    Digits = Digits \ 10

    X = Digits Mod 10
    Digits = Digits \ 10

    W = Digits Mod 10
    Digits = Digits \ 10

    W = W 7
    X = X 7
    Y = Y 7
    Z = Z 7

    W = W Mod 10
    X = X Mod 10
    Y = Y Mod 10
    Z = Z Mod 10

    lblEncrypted.Text = Y Z W X

    End Sub
    End Class

    DB:2.89:Visual Basic Modulus Operator 8a

    thanks man, my brain is getting bigger with all these...lol

  • RELEVANCY SCORE 2.89

    DB:2.89:Regular Expression - Hexadecimal Number dm


    Hello everybody, I am trying to write Regular Expression for Hexadecimal Fractional Number :

    Pattern.compile("([0-9A-F]*[.]?[0-9A-F]+)" + "|([0-9A-F]+[.]?[0-9A-F]+)" + "|([0-9A-F]+)" + "|([0-9]+)" + "|([A-F]+)");In fact for base2 to base36. Here is my regular expression generator for aforesaid bases :
    private Pattern generateRegulaX() {

    Pattern numRegulaX = null;

    int base = Integer.parseInt(this.inputBase);
    char[] digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
    String group1 = null;
    String group2 = null;
    String group3 = null;
    String group4 = null;

    if (base = 11) {
    if (base 11) {
    group1 = "([0-" + Integer.toString(base) + "]*[.]?[0-" + Integer.toString(base) + "]+)";
    group2 = "|([0-" + Integer.toString(base) + "]+[.]?[0-" + Integer.toString(base) + "]+)";
    group3 = "|([0-" + Integer.toString(base) + "]+)";
    } else {
    group1 = "([0-9A]*[.]?[0-9A]+)";
    group2 = "|([0-9A]+[.]?[0-9A]+)";
    group3 = "|([0-9A]+)";
    }

    numRegulaX = Pattern.compile(group1 + group2 + group3);
    } else {
    group1 = "([0-9A-" + Character.toString(digits[base - 1]) + "]*[.]?[0-9A-" + Character.toString(digits[base - 1]) + "]+)";
    group2 = "|([0-9A-" + Character.toString(digits[base - 1]) + "]+[.]?[0-9A-" + Character.toString(digits[base - 1]) + "]+)";
    group3 = "|([0-9A-" + Character.toString(digits[base - 1]) + "]+)";
    group4 = "|([0-9]+)" + "|([A-" + Character.toString(digits[base - 1]) + "]+)";

    numRegulaX = Pattern.compile(group1 + group2 + group3 + group4);
    }

    return numRegulaX;
    }I just want to know that is it okay, as I am new to Regex?
    Thank you.

  • RELEVANCY SCORE 2.88

    DB:2.88:Regular Expression For Phone Validation dj


    Hi

    I need to apply validation for phone numbers where [0-9]-12 digits , [+] , [,] , [.] and space are allowed.
    i am used \d+[+]+[0-9]{10}[,]+[.] but not getting the correct validation.

    My validation is user can able to type [+] or [,] or [.] or space in between the numbers too.

    Please HELP...

    Thanks
    Sudeep

    DB:2.88:Regular Expression For Phone Validation dj

    Hi Seerisha,

    My actual correct validation was to do like "+44 123.456.789" or "+44 123,456,789" in mobile number field.

    to use '+' in first , add space after that and can user ',' or '.' in between numbers.

    Regards
    Sudeep

  • RELEVANCY SCORE 2.87

    DB:2.87:Regular Expr: Numerical Data B/W Tags: z1


    Hi,
    I have been using a regular expression as: "b.[0-9]+./b",
    to parse the digits between tags, but it doesn't match with b2/b
    and similar. I have tried to follow backslash by 0 to 3 more baclslashes, as it may be a special character and in all cases it didn't found the match to b1/b etc. Could anybody tell why!

    gaurav_k1

    DB:2.87:Regular Expr: Numerical Data B/W Tags: z1

    b\s*\d+\s*/bHaven't tested it myself though.
    You can test it quickly using
    http://jregex.sourceforge.net/demoapp.html
    Note: that's plain text, not a java literal.

    PS. Here is some info that could help to not get confused with backslashes:
    http://jregex.sourceforge.net/gstarted.html#appendix-d

  • RELEVANCY SCORE 2.87

    DB:2.87:Regular Expression Validations For Alphanumeric Lower Case And Another Where First 4 Are Alpha Mixed Case And Last 3 Are Digits px


    Someone gave me a test for a login credential check that had validation for the following requirements:

    UserId: Alphanumeric, with alpha all lower case. Password: First four characters are mixed case alpha and the last three are numeric.

    I tried to use a regular expression, but was unable to remember how to do this in the time allocated and wound up doing it the hard way.
    Now I'm curious. Can someone post the RegEx expressions that could eloquently solve these validation requirements?

    DB:2.87:Regular Expression Validations For Alphanumeric Lower Case And Another Where First 4 Are Alpha Mixed Case And Last 3 Are Digits px

    Actually, for password this is what I think I need as digits are also valid: (?-i)^[a-z,0-9]$

    If you want your password to be at least 4 characters and at least 3 numbers, the game changes. If the password is allowed to be any alpha numeric character (7 in length) it's different again:
    at least 4 letters, at least 3 digits:
    (?i)^(?=(.*[a-z]){4})(?=(.*[0-9]){3})[a-z0-9]$
    if you want 4 letters, 3 numbers:
    (?i)^[a-z]{4}[0-9]{3}$
    if you want any number of letters and numbers, but at least 7:
    (?i)^[a-z0-9]{7,}$My blog: blog.jessehouwing.nl

  • RELEVANCY SCORE 2.86

    DB:2.86:Regular Expression Question 8s


    What's the regex to validate the given string should be in the below format?

    like, 1234WE (first 4 should be digits and last 2 chars must be upper case alpha).

    Thanks.

    DB:2.86:Regular Expression Question 8s

    user10744988 wrote:
    What's the regex to validate the given string should be in the below format?

    like, 1234WE (first 4 should be digits and last 2 chars must be upper case alpha).That's a fairly imprecise description, but start here:

    http://download.oracle.com/javase/tutorial/essential/regex/
    http://www.regular-expressions.info/tutorial.html

  • RELEVANCY SCORE 2.86

    DB:2.86:Query Regarding Regular Expressions p1


    Help me in regular expression for one or two digits must followed by : and one or two digits

    DB:2.86:Query Regarding Regular Expressions p1

    user8701050 wrote:
    thanqI assume you meant "thank you." Please use real words.

    In any case, you're welcome. So now that you know, your best course of action would be to study that tutorial, and/or this one: http://www.regular-expressions.info/tutorial.html, take your best shot, then post again if you get stuck, showing what you tried and explaining clearly the problems you encountered.

    Good luck!

  • RELEVANCY SCORE 2.86

    DB:2.86:Regular Expression To Check Number With At Least One Decimal Point 77


    Hi,I would like to use the REGEX_LIKE to check a number with up to two digits and at least one decimal point:Ex.10.11.1112This is what I have so far. Any help would be appreciated. Thanks.if regexp_like(v_expr, '^(\d{0,2})+(\.[0-9]{1})?$') t

    DB:2.86:Regular Expression To Check Number With At Least One Decimal Point 77

    Why regular expression, why not this?SQL with t 2 as 3 ( 4 select 10.1 val from dual 5 union all 6 select 1.1 val from dual 7 union all 8 select 1 val from dual 9 union all 10 select 12 val from dual 11 ) 12 select val 13 from t 14 where val - trunc(val) 0 15 and trunc(val) 9; VAL---------- 10.1

  • RELEVANCY SCORE 2.85

    DB:2.85:Regex: Ignoring / Skipping Digits Within An Input-String s8


    Hello@all,

    I´m using REGEX to query an input string for different formats. All regular expressions are stored in a table - through looping throough the dataset I do a Regex.Match against each table entry.
    Anyway I got a new request which looks as follows:
    Input string: 0400002078000100
    I´m interested only in the fist 10 Digits (therefor I use: 04000[0-9]{5}), ignore the next two digits ([0-9]{2}) and read again the next two digits.
    Result of the match should be 040000307801 .
    Thank you for any help,

    Best regards,

    Andre

    DB:2.85:Regex: Ignoring / Skipping Digits Within An Input-String s8

    String input = 0400002078000100;
    Match match = Regex.Match(input,@(\d{10})(\d{2})(\d{2}));
    if (match.Success)
    {
    string s1 = match.Groups[1].Value;
    String s2 = match.Groups[3].Value;
    Console.WriteLine({0}{1},s1,s2);
    }

  • RELEVANCY SCORE 2.85

    DB:2.85:Regular Expression For? 3d


    What would be the regular expression for extracting "LEDsOnFront" from the string "PUME-TestModules-LEDsOnFront-VIT.vit" (quotations not included)?






    Solved!
    Go to Solution.

    DB:2.85:Regular Expression For? 3d


    Well, I'm not sure what you're trying to do. The obvious answer would be to use the litteral LEDsOnFront as regex. If you want to remove this from

    the string you can use the "search and replace pattern.vi" with this regex and an empty string as replacement.

    If you want to extract any text between PUME-TestModules- and -VIT.vit you can use the following regex: PUME-TestModules-\K[^-]*

    [^-]* assume that the string you want to extract do not contain an hyphen, If the string you want to extract can contain an hyphen use the following regex instead: PUME-TestModules-\K.*(?=-VIT)

    Ben64

  • RELEVANCY SCORE 2.85

    DB:2.85:Formatting Number With Regular Expression And Php Preg_Replace 9k


    Hi,

    I would like to add a dash after every 3 digits in a given numbers (10 digits). For example, 9785678941 became 978-567-894-1. How could I achieve this with regular expression by using PHP preg_replace?

    Thank you.

    DB:2.85:Formatting Number With Regular Expression And Php Preg_Replace 9k


    Dear Gnter,

    Thank you very much for the looping solution.

    Best regards,

    Edwin

  • RELEVANCY SCORE 2.84

    DB:2.84:Regular Expression d8


    Hi,
    I am new to regular expressions. I need to write a regular expression for email. I know how to use regular expressions. Can you please write me the same.

    Thanks in advance

    DB:2.84:Regular Expression d8

    ...one expression does not make a summer.

    Maybe not all components and definitions of RFC822 where included in the regular expression but still helpful without programming superfluous lines of code ;-)

    By experience, the applied expression matches all "normal formed" email addresses in fulltext.

    For the future use take an eye on the new features such as positive and negative "look behind" and "look before" which where available in the latest implementation of REGEX in Java...

    sincerely
    Hans Georg FIlipp

  • RELEVANCY SCORE 2.84

    DB:2.84:Schema Pattern To Signify Empty Or 4 Digits (Zip Extension) 9f


    I am trying to establish a pattern where a zip code extension is only accepted if it is blank or 4 digits.

    At first I set the restriction length to 4 and the pattern to [0-9]* and the element to minOccurs = 0, which worked to a degree, The value is not required if the element is not provided, but if you provide the element it must be filled.

    For various reasons it would be better if we could allow the element with no response or the 4 digit restriction.

    The following pattern (i.e., blank or 4 digits) worked when used in a regular expression tool but gives an error in XML Spy that it is not a valid expression (it doesn't like the "\B":
    \B|\d{4}

    Any other suggestions that would fullfill the same result using a pattern that will be accepted by the schema.?

    DB:2.84:Schema Pattern To Signify Empty Or 4 Digits (Zip Extension) 9f

    I am trying to establish a pattern where a zip code extension is only accepted if it is blank or 4 digits.

    At first I set the restriction length to 4 and the pattern to [0-9]* and the element to minOccurs = 0, which worked to a degree, The value is not required if the element is not provided, but if you provide the element it must be filled.

    For various reasons it would be better if we could allow the element with no response or the 4 digit restriction.

    The following pattern (i.e., blank or 4 digits) worked when used in a regular expression tool but gives an error in XML Spy that it is not a valid expression (it doesn't like the "\B":
    \B|\d{4}

    Any other suggestions that would fullfill the same result using a pattern that will be accepted by the schema.?

  • RELEVANCY SCORE 2.84

    DB:2.84:Calling A Variable In Regular Expression ap



    Hi.  Is there any way to call a variable in a regular expression, instead of explicitly defining it?  For example,

     

    THIS WORKS:

     action 10   cli command "show run | section router ospf" action 20   regexp "passive-interface Serial4/0" "$_cli_result"

     

    BUT THIS DOES NOT:

    event manager environment _circuit1 Serial4/0

    ...

     action 10   cli command "show run | section router ospf" action 20   regexp "passive-interface $_circuit1" "$_cli_result"

     

    DB:2.84:Calling A Variable In Regular Expression ap


    Joe, I just wanted to follow up and let you know that this is working now.  I think it all came down to an issue with privileges.  Initially, I didn't have the 'enable' in my script.  Once I added 'enable', I could get it to work manually, but not with CRON...but I'm not sure why, as it's now working with CRON, too.  Here's what the final script looks like.  Thanks for trudging along with me on this one.

     

    event manager applet UNPASSIVE event timer cron cron-entry "0 2 * * *" action 10   cli command "enable" action 20   cli command "show run | section router ospf" action 30   foreach line "$_cli_result" "\n" action 40    set intf "none" action 50    regexp "passive-interface ([A-Za-z0-9/\.:]+)" "$line" match intf action 60    if $intf eq $circuit1 action 60.1   syslog msg "CRON job making $intf unpassive" action 60.2   cli command "enable" action 60.3   cli command "config t" action 60.4   cli command "router ospf 77" action 60.5   cli command "no passive-interface $intf" action 60.6   cli command "end" action 70    end action 80   end!

     

  • RELEVANCY SCORE 2.84

    DB:2.84:Regular Expression For Validation jj


    Hello,
    I have a serial number field and it can contains both alphabets and numbers except special characters. The serial number length should be either 6 digits or 8 digits or 10 digits. (Including the numerics and alphanumerics).
    How to write the regular expression for the above scenario?
    Any help much appreciated.
    Thank you.

    Kathir

    DB:2.84:Regular Expression For Validation jj

    Hi Nico,
    Thank you very much. I hope it works.
    Kathir

  • RELEVANCY SCORE 2.84

    DB:2.84:Functional Location Structure cc


    Hello Gurus,As we have some "-" in old equipments which will be a part of floc in SAP, we preferred to use "/" indicator as a seperator.so that they can keep their "-" in floc and can be strcutured like AA/234/23-45. but now we got a problem in defining the structure usin "/" indiacator when the equipment numbers not reached to its max limit..lets say strcuture 1st level - 2 digits,2nd level 4 digits , 3rd level 10 digits and 4th level 6 digits. When you create a FLOC , system expects to fulfill all the max digits on each levels ..if my 3rd level has only 5 digits and tried to go with 4th level using "/"..it is not accepting and says place the cursor to the right point. I tried with S option too to handle this but does not help me.Only way I find using "-" ..is there any other way to handle this ?Mahee

    DB:2.84:Functional Location Structure cc

    Yes..I am going to redesign with "-" seperator but only think going in my mind is to convince the business to remove the "-" in their old equipments to avoid confusion.Edited by: maheee on Apr 21, 2010 3:56 PM

  • RELEVANCY SCORE 2.84

    DB:2.84:Need Help In Building Regular Expression x1


    I need regular expression for exact 32 digit length with following validations
    1. Only Numerical Values.
    2. If first digit is 4 then 2nd and 3rd digits should not be equal to 76. This check applies only if first digit is 4.
    Thanks in advance

    DB:2.84:Need Help In Building Regular Expression x1

    My first expression contained a mistake. I fixed it by editing my post. Judging from the tim eyou proposed it as an answer, you've copied the unedited expression. Make sure this is what you're seeing:

    @^(?=[0-35-9]76|4)[0-9]{32}$

  • RELEVANCY SCORE 2.84

    DB:2.84:Regular Expression 1z


     
    Regex regex = new Regex( ^\d+$);
    this code gives an error pointing \d .
    error message is invalid escape character , but in fact \d is not escap character , \d means 0 to 9 digits.
     
    how can i fix this
    thnx

  • RELEVANCY SCORE 2.83

    DB:2.83:Regular Expression xa


    Hi,
    I need a regular expression which matches a sequence of 10 digits, which can only consist of a single 1 and 9 0's.

    example:
    0000000000 shouldn't be accepted
    0110101010 shouldn't be accepted

    only these 10 numbers can be accepted:
    1000000000
    0100000000
    0010000000
    0001000000
    0000100000
    0000010000
    0000001000
    0000000100
    0000000010
    0000000001

    To match these 10 numbers i was trying something of this form [1|0]{10}, but it doesn't restrict 1 to a single occurance. Is there a symbol i can include after the 1 to make it only choosable once?
    thx in advance,
    spi_mlt

    Edited by: Spi_Mlt on Nov 28, 2008 3:18 AM

    DB:2.83:Regular Expression xa

    Even shorter:
    String.matches("(?=0*10*$)[10]{10}")

  • RELEVANCY SCORE 2.83

    DB:2.83:Reg Expression Validaiton s9


    Hi everybody,

    Help me out please. I want to give a page level validation for a field using reg expression. The field should be numeric and can contain a max of 10 digits. How to write the reg. expression for this?.

    Thanks in advance.

    - Richard

    DB:2.83:Reg Expression Validaiton s9

    RETURN REGEXP_LIKE(:P1_FIELDNAME,'^[[:digit:]]{10}$') will result in a boolean answer.

  • RELEVANCY SCORE 2.83

    DB:2.83:Conversion Of Perl Regular Expression To Java Regular Expression 3d


    Hi all,

    I want to convert perl regular expression to java regular expression
    here is perl expression
    ~m/tr valign=middle bordercolor=#ffffff(.*?)/table/g;
    How can i convert above expression to java regular expression.

    Thanks
    Vinesh.

    DB:2.83:Conversion Of Perl Regular Expression To Java Regular Expression 3d

    Pattern.compile(".*tr valign=middle bordercolor=#ffffff(.*?)/table.*");presuming that *? has the same meaning in Perl as in Java, rather than being a redundancy.

  • RELEVANCY SCORE 2.82

    DB:2.82:Axc Regular Expressions Under Clipboard jm



    Has anyone tried to do a Clipboard Regular expression in AXC. Im trying to insert an * between numeric digits. Example 12345 1*2*3*4*5*

    I tried \d \1{8} and that didnt work.

    Please let me know if this is possible

    DB:2.82:Axc Regular Expressions Under Clipboard jm


    Has anyone tried to do a Clipboard Regular expression in AXC. Im trying to insert an * between numeric digits. Example 12345 1*2*3*4*5*

    I tried \d \1{8} and that didnt work.

    Please let me know if this is possible

  • RELEVANCY SCORE 2.82

    DB:2.82:Datagridview Cell Size Limit ad


    Hi,How can I limit the number of digits entered into the cells of a column in datagridview?For example, in column 10 of the datagridview, I would like users to be able to enter up to 8 characters.Thanks

    DB:2.82:Datagridview Cell Size Limit ad

    In the editing control showing event you can set the max length for the textbox being used for editing
     

    Code Block

  • RELEVANCY SCORE 2.80

    DB:2.80:Regular Expression Ignore Before 9a


    I have been trying to get a regular expression to work but I have not had any luck so far.
    I want to ignore everything preceding and including the regular expression. I thought it would be easy but I am just missing it.
    I have a file name 30827_msit-02_feds_jan_2012.xls and I would like to ignore the first half 30827_msit-02_. The file names are the same basic format digits_msit-digits.
    I am really looking to get the feds part out of the name.
    Any help would be appreciated.

    DB:2.80:Regular Expression Ignore Before 9a

    The SuibMatch property is how you access a capturing group, as I wrote in a message dated Aug 11. Since the regex in your current routine does not include a capturing group, attempting to access the submatch property will return an invalid response.
    In addition, when you access a SubMatch, you must specify an Item number, which I showed in my example, but you failed to include.
    If you are not using capturing groups, then your segment should read:
    If re.Test(InValue) = True Then
    Set mc = re.Execute(InValue)
    For Each m In mc
    Debug.Print m
    Next m
    End If

    If you are going to use a capturing group, and want to return capturing group 1, then you need to change your regex to:
    Const sPat As String = (the)
    and the code snippet to:
    If re.Test(InValue) = True Then
    Set mc = re.Execute(InValue)
    For Each m In mc
    Debug.Print m.SubMatches(0)
    Next m
    End If

    Ron

  • RELEVANCY SCORE 2.79

    DB:2.79:Regular Expression To Match Incremental Or Consecutive Digits k1


    I need to process a string containing all digits to ensure that it does not contain either
    (a) a group of 5 or more consecutive identical digits eg. 11111
    (b) a group of 5 or more incremental/decremental digits eg 12345, 98765

    Also, is there a processing difference between the reluctant and greedy qualifiers?

    Case (a) seems to be easy:
    Pattern pattern = Pattern.compile("[0-9]{5,}?");but what about (b) ? From the documentation it seems that using capturing groups might be helpful, but they are confusing me.

    Finally how do I merge multiple pattern matching strings into one overall regular expression so I can make one pass on the input to see whether it is valid or not?

    Thanks

    Chris

    DB:2.79:Regular Expression To Match Incremental Or Consecutive Digits k1

    I need to process a string containing all digits to
    ensure that it does not contain either
    (a) a group of 5 or more consecutive identical digits
    eg. 11111So there is 10 of these (11111, 22222, ..., 00000)

    (b) a group of 5 or more incremental/decremental
    digits eg 12345, 98765And probably 20 or less of these (12345, 23456, ....54321)

    Put them in regex

    (11111|22222|...54321)

    Coding it specifically might be faster though.

  • RELEVANCY SCORE 2.79

    DB:2.79:Replace All Except Digits And First Occurence Of Point Regular Expression p1


    Hi,

    I'm trying to replace all the characters except digits and first occurence of point in String with regexp.

    String s = "V2.10.1".replaceAll(""[^\\.|\\d]"", ""); //s -- 2.10.1

    After replaceAll, i'd want s to be "2.101".

    More examples:
    V2.0 -- 2.0
    V2.1.1 -- 2.11
    V2.1.11.2 -- 2.1112 and so on...

    Is this doable with one regular expression?

    DB:2.79:Replace All Except Digits And First Occurence Of Point Regular Expression p1

    ddkas wrote:
    Can you give any pointer how to solve this problem? The problem I have with this sort of request is trying to decide whether or not it is a school/college/university assignment. In this case I doubt it so one solution is String s = "VVABcde21111.10.1.2".replaceAll("[a-zA-Z]|((?!^|[a-zA-Z0-9])\\d+)\\.", "$1");Now I bet that uncle_alice (the local regex guru) will be able to improve on that but ...

    Of course you are now going to ask me to explain it.

  • RELEVANCY SCORE 2.79

    DB:2.79:Index Plus Fields dc



    Hi All,

    I would like to know if there is a Regular Expression which I can use to restrict the users from entering digits or any other values but only A-Z.

    Could you please provide me some regular expressions which can do it.

    Thanks in advance.

    DB:2.79:Index Plus Fields dc


    I'm not sure why it didn't work for you. It did on my test. Either way, try it without the symbols ^ and $ (like Bharani said) and let us know if it works.

    If you want to include underscores, you could simplify the regular expression by using the following:

    [\w]{1,30}

  • RELEVANCY SCORE 2.79

    DB:2.79:How To Get This Regular Expression Validation? 9d


    itriedthis
    ^[0]\d{5}[/A-z]$

    Ex:011111/Sam
    First digit should be 0
    After 5 digits, there should be a slash (/)
    After slash the user should be able add text.
    can anyone help me in solving this error
    thanks

    DB:2.79:How To Get This Regular Expression Validation? 9d

    hi,
    I think you can reference this link:http://www.codeproject.com/Articles/13255/Validation-with-Regular-Expressions-Made-Simple

  • RELEVANCY SCORE 2.78

    DB:2.78:How To Accept Only 10 Digits In A Editbox..In Native Code...And Creation Of Edit Box Is Dynamic.. mx


    hi all..     i am creating a edit box which should accept only 10 digits..for this i used ES_NUMBER for accepting only digits...but ..how can i limit this to only 10 digits..     any help will be greatly appreciated..                            thanks in advance..                                                     with regards                                               Avinash

  • RELEVANCY SCORE 2.78

    DB:2.78:I Want A Regex For Decimal(10,4) 9p


    Hello msdn,
    I want a regular expression for Decimal(10,4), means Maximum 10 digits, after decimal point(only 4 allowed). How can I write Regex for this?
    Could anyone help me with a sample regex?

    Regards
    Salam

    salampv.07

    DB:2.78:I Want A Regex For Decimal(10,4) 9p

    should Michael's answer not covered it completely, try asking in the regex forum over here:
    http://social.msdn.microsoft.com/forums/en-US/regexp/threads/

  • RELEVANCY SCORE 2.78

    DB:2.78:Help In Regular Expression 99



    Hi,

    Could somebody help me with the regular expression for the following validation of a text field?

    1) Total characters in the text field should be limited to 15 (including decimal part if any)

    2) The total number of digits after the decimal point (trailing digits) is not more than 5 (however, the decimal part is not mandatory)

    The valid values are :

    123456789.12345

    1123456789.1234

    123456789123456

    123456789123.10

    12345

    12345.152

    1.12345

    The invalid values are :

    12345.123456

    12345678.1234589

    0.1234567

    Please Note : Due to some reasons i dont want to go for either a decimal or numeric field. I want to use only a text field.

    Thanks,

    VJ

  • RELEVANCY SCORE 2.78

    DB:2.78:Regular Expression And Pl/Sql Help 87


    I am using Oracle 9i, does 9i support regular expression? What functions are there?

    My problem is the birth_date column in my database comes from teleform ( a scan program that reads what people wrote on paper), so the format is all jacked up.... 50% of them are 01/01/1981, 10% are 5/14/1995, 10% are 12/5/1993, 10% are 1/1/1983, 10% are 24-JUL-98. I have never really used regular expression and pl/sql, can anybody help me convert all of them to 01/01/1998?

    Does Oralce 9i support regular expression? What can I do if oralce 9i does not support regular expression? Thank you very much in advance.

    DB:2.78:Regular Expression And Pl/Sql Help 87

    A savepoint will probably not help. Once it is commited the data will stay. Savepoint or not.

    how can you connect between your test environmant and production? Is there a databaselink?

    You might be able to do:
    update dmd2 d2
    set d2.birthdate = (select d1.birthdate from dmd1 d1 where d1.id = d2.id and d1.l_name = d2.l_name)
    where d2.birthdate = to_date(12-JUN-2043','dd-mon-yyyy');

  • RELEVANCY SCORE 2.78

    DB:2.78:Regexp_Like sc


    Hello folks,

    Looking for a way to make this regular expression work:
    select *
    from (select '12356/123' as pojam
    from dual)
    where regexp_like(pojam, '^([[:digit:]]{5})+\/+([[:digit:]]{3})');I need first 5 digits followed by a slash and then another 3 digits. Thing is it doesnt have to be 5 digits. It can be 1 or 2 or 3 etc. Same goes for the last 3 digits.

    I am looking for something like:

    select *
    from (select '12356/123' as pojam
    from dual)
    where regexp_like(pojam, '^([[:digit:]]{1-5})+\/+([[:digit:]]{1-3})');Best regards,
    Igor

    DB:2.78:Regexp_Like sc

    The + means, that the group before, enclosed by the parentheses (), has to appear one ore more times.
    So this works for me with the data given.
    What exactly didnt work?
    To be correct you should add add $ at the end, because you wont anything follow the 1-3 digits at the end.

    Ah i see
    select *
    from (select '123456/123' as pojam
    from dual)
    where regexp_like(pojam, '^([[:digit:]]{1,5})+/+([[:digit:]]{1,3})');

    POJAM
    "123456/123"There is a result because 12345 meets the first occurence of the group ([[:digit:]]{1,5})+ (you could haveleft out the paranthese, no grouping needed here).
    The 6 is valid regarding the group, soit is considered as the second appearence of the group, which is allowed due to the +.

    Edited by: chris227 on 18.03.2013 08:51

  • RELEVANCY SCORE 2.77

    DB:2.77:Re: Perl Regular Expression To Java Regular Expression 33


    Truncate your expression until it works. Then slowly add to your expression, and try to figure out what's going on.

    DB:2.77:Re: Perl Regular Expression To Java Regular Expression 33


    http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex
    Pattern.html
    See "Comparison to Perl 5" section. Hi, is there any possibility beside java.util.regex
    class to use regular expressions?. I have to use only
    1.3 or 1.2 java version.

    thanks in advance,
    JPThere are some third party regExp packages available. Google for them

    matfud

  • RELEVANCY SCORE 2.77

    DB:2.77:Regular Expression ? mc


    Hi,
    1)I need a regular expression
    It has to allow only a-z A-Z 0-9 . _
    2) Another Regular Expression
    In a multiline text box i allowing user to enter mobile number with semicolon(;) i have to check whether the format means 10 digits;10digits; like this.........

    DB:2.77:Regular Expression ? mc

    Hi,
    Find the code below-

    head
    title/title
    script src=Scripts/jquery-1.4.1.min.js type=text/javascript/script
    /head
    body
    input id=Button1 type=button value=button /input id=Text1 type=text /br /
    input id=Button2 type=button value=button /input id=Text2 type=text /
    script type=text/javascript
    //for string
    jQuery(#Button1).click(function () {
    var re = RegExp(^[a-zA-Z0-9_.]*$);
    if (jQuery(#Text1).val().match(re))
    alert(Match);
    else
    alert(Does not match);
    });

    //For phone no.
    jQuery(#Button2).click(function () {
    var re = RegExp(^([0-9]{10};)*$);
    if (jQuery(#Text2).val().match(re))
    alert(Match);
    else
    alert(Does not match);
    });

    /script
    /body

  • RELEVANCY SCORE 2.77

    DB:2.77:A Better Way To Represent This Pattern? dx


    I usethis Regular Expression for validating a 9 character string: either 'A' followed by 8 digits, or simply 9 digits.

    ^[A0-9]\\d{8}$

  • RELEVANCY SCORE 2.76

    DB:2.76:Limit The Values Of Text Box To Two Digits mz


    How do we limit the values of a TextBox so that the user can't enter greater than a two digit number.
    If this done, is it possible that a user can't enter values greater than 10?

    DB:2.76:Limit The Values Of Text Box To Two Digits mz

    Let me show u an easy code which ,by the grace of Allah I have drafted myself:

    private void txtAge_Leave(object sender, EventArgs e)
    {
    if (txtAge.TextLength 2)
    {
    MessageBox.Show(Age must be between 1 to 99);
    txtAge.Clear();
    txtAge.Focus();
    }
    }

  • RELEVANCY SCORE 2.75

    DB:2.75:Zero Fill In A Field xk


    Hi,Is there a way to zero fill a field that's less than the limit? This is not an InfoPath form or an ASP page. It's just a custom list. For example, employee numbers are 10 digits. I limit the field to 10 digits and ask the user to use the leading zeros in their employee number. But, most people can't or don't read instructions, so I'd like to zero fill if they enter less than 10 digits. The user enters: 7891238SharePoint zero fills: 0007891238Is this possible in a calculated cell?Thanks!Thanks!

    Patti N.

    DB:2.75:Zero Fill In A Field xk

    Use the testbox field for the column and then run a WF to append the zeros.You might want to run this WF everytime the item is added and edited (to save time check which field was edited at the start of WF).Monalihttp://sharepointway.blogspot.com/

  • RELEVANCY SCORE 2.75

    DB:2.75:Regular Expression For Validation fk


    Hi,

    I need to validate New jersey Taxpayer Identification Number

    The length of this control 12 digits.

    The validation scenarios:

    This control contains only 12 digits.

    all 12 digits are not same.
    Ex: 111111111111
    ..
    999999999999
    it should not be sequence order
    like 123456789012

    It should not contain last three digits are zeroes
    like 543044885000

    I need one regular expression for all the above scenarios.

    Thanks' in advance.

    --
    Best Regards
    Ranganth potluri

    DB:2.75:Regular Expression For Validation fk

    Hi,

    I need to validate New jersey Taxpayer Identification Number

    The length of this control 12 digits.

    The validation scenarios:

    This control contains only 12 digits.

    all 12 digits are not same.
    Ex: 111111111111
    ..
    999999999999
    it should not be sequence order
    like 123456789012

    It should not contain last three digits are zeroes
    like 543044885000

    I need one regular expression for all the above scenarios.

    Thanks' in advance.

    --
    Best Regards
    Ranganth potluri

  • RELEVANCY SCORE 2.74

    DB:2.74:Reqular Expression For Zip Code + 4 as


    Hey All,
    Disclaimer! I am not very familiar with regular expressions. I suppose if I was I wouldn't be here groveling for help...
    I am trying to come up with a regular expression that supports a zip code with or without the 4 numbers on the end. I need this for a validation control in a web page I am working on. I am using an Infragistics mask control to get the zip
    code. This mask control has a dash in it to seperate the first five digits from the last four digits. Even when there are only five digits being entered the dash is always there. So,if the user enters 55555 the control really contains
    55555-. With some help I was able to come up with this expression:
    (^(?!0{5})(\d{5})(-?)(?!0{4})(\d{4})?$)
    This expression should work according to the Regular Expression Workbench I downloaded but when I paste it into the regular expression validation control it still balks at the dash being present. Doesn't the question mark denote that the dash may or
    may not be there?
    Can anyone help me out?
    Thanks!
    Kevin

    DB:2.74:Reqular Expression For Zip Code + 4 as

    Hello,
    This might helps!
    You can get regular expression from following link: Lots of Zip code regular expressions...
    Regular Expression Library

    You can verify that expression on following link.:
    Javascript Regular Expression Validator | Regular Expressions Library and Testing Tool

  • RELEVANCY SCORE 2.73

    DB:2.73:Question About Regular Expression In Bgp pd



    When using regular expression in BGP as-path access-list or community-list, where is referred to as "begnning" or "end" of a AS path list or community value list?

    For example, if "show ip bgp 100.1.1.0" shows AS-path (65001 65002) 111 222 333 444 555, AS 555 would be the orinigating AS. When using regular expression, should I make 555 as the beginning of the string or end of the string?

    With 65001 and 65002 as IBGP confederation AS, can I use regular expression to specify them or only true EBGP AS can be in regular expression?

    Same explame, if show ip bgp shows community values 111:10 222:20 333:30 etc, which one is considered as the begining of the string?

    Thanks a lot

    DB:2.73:Question About Regular Expression In Bgp pd


    For example, if "show ip bgp 100.1.1.0" shows AS-path (65001 65002) 111  222 333 444 555, AS 555 would be the orinigating AS. When using regular  expression, should I make 555 as the beginning of the string or end of  the string?

    end of the string.

    With 65001 and 65002 as IBGP confederation AS, can I use regular expression to specify them or only true EBGP AS can be in regular expression?

    You can specify them.

    Same explame, if show ip bgp shows community values 111:10 222:20 333:30 etc, which one is considered as the begining of the string?

    110:10

  • RELEVANCY SCORE 2.73

    DB:2.73:Jformattedtextfield Mask And Regular Expression j9


    Hi,
    I have to allow a user to enter numeric values only. The first 3 digits are mandatory, followed by a space, followed by a maximum of 20 digits,
    I am trying to use the regex formatter from Sun at
    http://java.sun.com/products/jfc/tsc/articles/reftf/

    Plus, I wanted to have a mask as well, so that the user does not have to type-in the space.
    So far, I haven't had any luck in getting to implement both.

    Any helps would be greatly appreciated.
    Thanks

    DB:2.73:Jformattedtextfield Mask And Regular Expression j9

    Thanks a lot! That workd perfectly. I've been searching for an answer for ages!!

  • RELEVANCY SCORE 2.73

    DB:2.73:El And Regular Expression 7m


    I am trying to use a Regular Expression in Tomcat 6.0.20 with EL where I can match something and replace it. For example I would like to eliminate the digits in a test word called joe2222
    The EL value: joe2222
    should show: joe

    The below example didnt work where it outputs joe2222 instead of joe

    c:set var="info" value="joe2222" /
    Here are results = ${fn:replace(info,'\\d+','')}Please advise if I can use Regular Expressions in EL to manipulate a value?

    DB:2.73:El And Regular Expression 7m

    As far as I know it's not possibe to use regex in JSTL. You can write a custom function that will do such task. Here is a quick example and a search direction how to do that.

  • RELEVANCY SCORE 2.72

    DB:2.72:Url Regular Expression f9



    Hi there !

    I'd like to create an "Access control rule" to just allow certain URLs for a group of users.

    So I'm lokking for the correct "regular expression" to have the following:

    Deny:

    http://*.*/*.jad and http://*:*/*.cod

    Allow:

    http://mycompany.*/*.jad and http://mycompany.*/*.cod

    Any ideas?

    I have looked at http://regexlib.com/CheatSheet.aspxbut didn't get a working result.

    Thanks

    CS

    DB:2.72:Url Regular Expression f9


    Unless you locked down the browser with an IT policy, user can change their browser to ISPto get around it.

    Maybe a software config would be better?

    KB05392 - How to control and remove third-party applications using a software configuration




    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs upClick to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.

    SIM Free BlackBerry Unlocking FAQFollow me on Twitter @knottyrope

    Want to thank me? Buy my KnottyRope App here

    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • RELEVANCY SCORE 2.72

    DB:2.72:Very Simple Question About Reg Ex. How Can I Limit The Textbox Imput With Reg. Ex. ? j7


    I am working with Visual Basic in a Visual Web Development Express enviroment. I would like to limit the imput of a textbox in one of my forms to 2,000 characters. What would be the coding for the regular expression? I know that this is very simple but I am new to regular expressions.
     
    Thanks

    DB:2.72:Very Simple Question About Reg Ex. How Can I Limit The Textbox Imput With Reg. Ex. ? j7

    Your code  ^.{,2000}$ gave me errors, and it is close to those that I tried before. So I changed to ^.{1,2000}$ and is working fine. So since to be that I need to specified the length of the text and the beginning as well.
     
    Thanks

  • RELEVANCY SCORE 2.72

    DB:2.72:Help With Regular Expressions pk


    Hi,
    I need to write a regular expression that would correspond to the following:
    any string that starts with 123 followed by 50, 52 or 66 followed by any 7 digits
    OR
    any string that starts with 123 followed by 543, 675 or 890 followed by any 6 digits.
    In both cases, the total string length should be exactly 12 digits.

    I tried something like:
    123[([\Q50\E\Q52\E\Q66\E][\d]{7})([\Q543\E\Q675\E\Q890\E][\d]{6})]

    but it did not work correctly.

    Would appreciate your feedback.

    Laith

    DB:2.72:Help With Regular Expressions pk

    Hi,
    Thanks a lot, it is working now.

    Laith.

  • RELEVANCY SCORE 2.72

    DB:2.72:Bgp Regular Expression jm



    How can I match with a bgp regular expression the following conditions:

    - starts with AS200

    - AS200 may be prepended as often as AS200 wants to

    - is originated in AS200

    DB:2.72:Bgp Regular Expression jm


    hi,

    i suggest :

    - starts with AS200 = ^200_

    - AS200 may be prepended as often as AS200 wants to = ^200(_200)*+$

    - is originated in AS200 = .*_200$

    Tran

  • RELEVANCY SCORE 2.72

    DB:2.72:Regarding Expression Help dp


    Hi all,

    I want to convert perl regular expression to java
    here is perl regular expression "~ s/[\n\t\r]//g"
    what will be the regular expression in java to match above perl regular expression.

    thanks
    vinesh.

    DB:2.72:Regarding Expression Help dp

    I don't know Perl's regex that well but, presuming I read that correctly, it is removing all spaces, carraige returns, and newlines from the target, yes?

    Presuming this is correct, try...
    String myString = ...;
    myString = myString.replaceAll("(\n|\t|\r)","");

  • RELEVANCY SCORE 2.71

    DB:2.71:Limiting Entry In Text Forms sd


    I'm creating a form with multiple text boxes, which I want to limit in various ways. I did it all the time in 2003, but can't figure how to do it in 2010.
    * Phone number - limit entry to max 10 DIGITS ##########. Optionally,10 digits with pre-set dashes or parens
    * Text - limit entry to3characters

    To clarify - I have the Developer ribbon, I've placed the content control. I just need to know how to place entry restrictions on the controls.

  • RELEVANCY SCORE 2.71

    DB:2.71:Regular Expression Help x8


    Hi i want to have regular expression for search pattern.
    Pattern will be like the below
    99999999-9999999-99

    The first part until '-' character must containnumbers between 0-9 of 9 digits . eg.000000000is acceptable. 999999999 is acceptable

    Second part between '-' and '-' can contain numbers between 1-7 but minimum 1 digit and maximum 7 digit. e.g 1 is acceptable, 1234567 is acceptable, 0 unacceptable.
    Thirdpart after last '-' character must contain numbers between 1-9 of 2 digits. eg. 1 is acceptable 99 is acceptable, 0 unacppetable.

    DB:2.71:Regular Expression Help x8

    On Fri, 27 May 2011 00:37:20 0000, bonosungho wrote:

  • RELEVANCY SCORE 2.71

    DB:2.71:Allow Specific Characters - Regular Expression 9a



    Hello everyone

    I am new to regular expression and I have a very simple question. I use the "read from text file" function to load a Tab delimited file with 3 columns into my VI. Next, the string is converted in array and I use the values.

    Nevertheless, I want to develop a "filter" allowing only digits (0-9), colon, comma and point into strings.

    Using the "match regular expression" function, I was trying a regular expression like that:

    [^0-9]|[^\].[|^:]|[^,]

    But it is not working.

    Could someone help me with this issue?

    Thanks

    Dan07







    Solved!
    Go to Solution.

    DB:2.71:Allow Specific Characters - Regular Expression 9a


    Darin

    So, the best option for me would be[^0-9:,][.] ??

    Thanks.

    Dan07.

  • RELEVANCY SCORE 2.71

    DB:2.71:Help With Regular Expression xp


    Hi,

    Quite a noob in RegEx, need your help in this please:

    boolean matches = "254722407717".matches("^[+]?^[0]?^[254]?[7]?[10-25]?\\d{8}$" );
    System.out.println(matches ? "Valid" : "Invalid");Lets break it down;

    Phone Number format: +2547XXXXXXXX; 07XXXXXXXX; 2547XXXXXXXX

    We have an optional + or optional 254 or optional 0 at the beginning of the phone number

    After which we must have a 7

    Then we must be between 10 and 25

    After which the rest of the digits must be 6 digits long

    Example matches are

    +254721313320
    254721313320
    0722313320

    I think I have the expression correct, but its always printing out invalid. Any help please?

    DB:2.71:Help With Regular Expression xp

    Based on your original specification the regex is still too permissive. You should setup a good test harness that allows you to test with bad data and not just good data. As it stands your regex might as well just be ".*".

  • RELEVANCY SCORE 2.71

    DB:2.71:Free Form Template Regular Expression Question m3



    I am trying to use Assertions in a regular expression in Free Form Designer but am having no luck.

    For example, I want to extract 5 digits before the last occurrence of 01 and not include 01 in this string 01234012345678901.

    Outside of Captiva I would use this regular expression including a lookahead (?=) assertion ([0-9]{5})(?=01). This returns 56789 as expected.

    This same regular expression does not work in Captiva. Any chance that something like this can be accomplished?

    Thanks.

    DB:2.71:Free Form Template Regular Expression Question m3


    I am trying to use Assertions in a regular expression in Free Form Designer but am having no luck.

    For example, I want to extract 5 digits before the last occurrence of 01 and not include 01 in this string 01234012345678901.

    Outside of Captiva I would use this regular expression including a lookahead (?=) assertion ([0-9]{5})(?=01). This returns 56789 as expected.

    This same regular expression does not work in Captiva. Any chance that something like this can be accomplished?

    Thanks.

  • RELEVANCY SCORE 2.70

    DB:2.70:Limit The Number Of Digits At Destination Pattern In As5350 zp



    Hi

    I wanna configure an as5350 dial peers to accepts the exact number of digits for destination pattern like this :

    destination-pattern 00T

    now i want the client do not enter more than 10 digits for destination pattern like 3144003232 if they are enter more than ten they received an error from as5350.

    just limit the numbers of digits at destination pattern.

    Thanks.

    Best Regards B.Mozaffari

    DB:2.70:Limit The Number Of Digits At Destination Pattern In As5350 zp


    Hi,

    use ^ and $ in your pattern. If you create

    destination pattern ^3144003232$

    it should work for you.

  • RELEVANCY SCORE 2.70

    DB:2.70:Regexp For Exclude Special Characters 39


    hi!

    i need a regular expression, which allows all chars and digits [A-Za-z0-9], without special characters like []@.

    anyone can help me? thx!

    bye,
    christian

    DB:2.70:Regexp For Exclude Special Characters 39

    Hi Christian,
    one more site for regular expressions
    where u can find the code for any kind of regular expressions

    http://www.yocoya.com/pls/apex/f?p=40714:REGEXP_RESULT:0::NO:::

    bye
    Srikavi

  • RELEVANCY SCORE 2.70

    DB:2.70:Regular Expression For A Password Field Validation. sf


    I have to validates a strong password using RegEx. It must be between 8 and 10 characters, contain at least one digit, one alphabetic and one special character.

    Can any one tell me the with the correct regular expression for this?

    DB:2.70:Regular Expression For A Password Field Validation. sf

    Here you go:
    string password = 456tgfd;
    Regex len = new Regex(^.{8,10}$);
    Regex num = new Regex(\\d);
    Regex alpha = new Regex(\\D);
    Regex special = new Regex([%#@]); // Put here more special characters

    if (len.IsMatch(password) num.IsMatch(password) alpha.IsMatch(password) special.IsMatch(password))
    {
    // successful match - write your code here
    }

    Noam B.
    Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...

  • RELEVANCY SCORE 2.70

    DB:2.70:Get Only Digits And Special Character zx


    Hi,I have a string like this RegCallnUm5*698142#6 what I need to do is to remove all character a-z and left all the rest... 5*698142#6 is there an easy way to do that ? Regular Expression ?Thankshttp://BrunoZP.com.br || http://BrunoZP.com

    DB:2.70:Get Only Digits And Special Character zx

    string s = RegCallnUm5*698142#6;string s2 = Regex.Replace(s, [a-zA-Z], string.Empty);

  • RELEVANCY SCORE 2.70

    DB:2.70:Problem Creating A Regular Expression 7z


    Hi Everyone

    I am trying to create a regular expression for validating a password string for the following given rule -

    It must contain atleast any two of following 4 classes of characters -
    1. lowercase letters.. a - z
    2. uppercase letters.. A - Z
    3. digits.. 0 - 9
    4. Special characters.. !@#$%^*()/?

    I m having a hard time creating such regular expression. I will really appreciate if someone can help me with this.

    DB:2.70:Problem Creating A Regular Expression 7z

    [http://google.com/search?q=regular+expression+password+validation+site:forums.sun.com]

  • RELEVANCY SCORE 2.70

    DB:2.70:Extracting Text From A String Using Regular Expression 7j


    I am new to regular expression i am trying to write a regular expression so that i can extract text from a line .

    This is one of the sample line

    2007-01-10 16:42:06,646 DEBUG 2216 Symcon.Utils.MessageLogger.Logger - WRITE ERROR IN Range Name: __INPUT.Sample_MasterItem1.R37.I.S2.M1.81918e77_d732_48da_8634_849d2eb2fa27

    I have written a regular expression for this as

    Text Snippet

    DB:2.70:Extracting Text From A String Using Regular Expression 7j

    i was not aware of this .... i have marked it now ... i am sure it will be helpful for others as well  :-) . Thank you
     
    Take care
    Manju
     
     

  • RELEVANCY SCORE 2.70

    DB:2.70:Re: Problem With Validation Type: Regular Expression 3f


    The forum software has mangled the regular expressions in your post. You should edit it, wrapping the regexps in \ tags so they are properly displayed.^[1-9]{1}$|^10$
    would be one regular expression that performs the required validation, however a regular expression doesn't appear to be the most straightforward way to validate such a range of values. A SQL or PL/SQL validation would be clearer, using the expression::p40_opt between 1 and 10

    DB:2.70:Re: Problem With Validation Type: Regular Expression 3f

    HI
    i've changed my validation into pl/sql expression

    as suggested

    works great !

    thank you very much

    best regards

  • RELEVANCY SCORE 2.70

    DB:2.70:Regular Expression For A Fixed Word Followed By Fixed Number Of Digits xk


    Hi Experts, could you tell meRegular expression for a fixed word followed by fixed number of digits
    Eg TY23232 , TY84949

    TY followed by fixed 5 digits

    Thanks in advance,
    Kiran

    DB:2.70:Regular Expression For A Fixed Word Followed By Fixed Number Of Digits xk

    Hi,
    be a bit more adventurous...
    TY\d{5}
    Greetings,

    Wolfgang Kluge
    gehirnwindung.de

  • RELEVANCY SCORE 2.70

    DB:2.70:Regular Expression 31


    Hi,
     
    I want to make a regular expression in a schema file that will support:
     
    Max 15 digits, min 1 digit
    including a mandatory comma anywhere between the {1,15} digits.
     
    digit can be anywhere between [0-9].
     
    Please do the needful.
     
    Thanks,
    ABC
     

    DB:2.70:Regular Expression 31


    Hi,
    I think Martin's reply should be marked as the answer.

  • RELEVANCY SCORE 2.69

    DB:2.69:Regular Expression For Valid Hostname dz


    Hi,Please let me know regular expression to validate a Hostname. Criteria:Hostname's labels may contain only the letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted.Thanks in advance.P

    DB:2.69:Regular Expression For Valid Hostname dz

    ^([a-z0-9](?:[a-z0-9-]*[a-z0-9]))I am using the above regex just for validating the host name.Thanks.P

  • RELEVANCY SCORE 2.69

    DB:2.69:Digits Only Regular Expression - Regexclean Transformation x1


    I have a list of international and mis-typed phone numbers to data scrub.  They contain all sorts of symbols and formatting.  E.g., ...5511-4588-170581.2.726.778263-7-3266-0677I'm trying to write a regular expression using the free Konesans RegexClean SSIS transformation to take a string, identify only digits, and replace the string with a digits-only version.  I'm having difficulty figuring out the correct syntax because I never know how many digits, digit groupings, or symbols each string will have.  Is this possible using a regular expression and RegexClean?

    DB:2.69:Digits Only Regular Expression - Regexclean Transformation x1

    It's pretty ugly, but this seems to work.  Just add more variables to the match and replace expressions if you have more than 7 segments of numbers in your string.Match Expression: \D*(?a\d+)\D*(?b\d+)\D*(?c\d+)\D*(?d\d+)\D*(?e\d+)\D*(?f\d+)\D*(?g\d+)Replace Expression: ${a}${b}${c}${d}${e}${f}${g}

  • RELEVANCY SCORE 2.69

    DB:2.69:Validation Controls In Asp.Net fa


    hi guys, i used a regular expression validator, so i want to make my own zip code validation expression its start with digit 5 and contains maximum 6 digits length, how to get this?

    DB:2.69:Validation Controls In Asp.Net fa

    \d{5,6}or[0-9]{5,6}depends on the engine