Need Help - regular expression

Hello,
I am doing one kind of parsing in which my input string will be
INPUT : hi*< img src='ani.gif'>*
Desired output : hi
Means I want to write a reg exp for omitting text in bold shown in above.
thanks
Aniruddha

prometheuzz wrote:
jverd wrote:
I continue to be disappointed, but not surprised, at how people are either unable or can't be bothered to communicate their problem requirements, and to consider that there might be cases that may or may not match the one example they give and that need to be accounted for.Yes, I know the feeling. And when asked for clarification, you frequently get just one other example leaving the remaining 1000 cases to guess for the people answering the question.Yup.
OP: i need regex.......... to turn numbers into X........
Us: Provide more detailed requirements, and examples of what would and wouldn't get changed.
OP: "a 1" --> "a X", but "a b" --> "a b" .......bcos...... there r no numbers.
Us: See previous reply. More detail. Examples.
OP: ok i thot u guyzz were pros r sumtin so i wudnt have 2 xpln evrthng but whatevs.....lol......... so like i have letters..... and numbers..... n if therz a number i wan 2 mak it a x, like a 1 becomz a x n b 2 bcoms b x......... do u clr now......... pls give me teh codez........ or maybee dis prob 2 hard for u guyzzz..... i chalegne u to do it.....
Us, deciding it's not worth it to try to explain that his two examples are identical, that his "explanation" added no new information, that he needs to specify whether each digit becomes and X or each numerical token, whether numbers that are connected to words without an intervening space get converted, etc.:
[:headdesk:|http://www.geocities.com/darrylbu/images/headdesk.gif]
[:headdesk:|http://www.geocities.com/darrylbu/images/headdesk.gif]
[:headdesk:|http://www.geocities.com/darrylbu/images/headdesk.gif]
[:headdesk:|http://www.geocities.com/darrylbu/images/headdesk.gif]
[:headdesk:|http://www.geocities.com/darrylbu/images/headdesk.gif]
[:headdesk:|http://www.geocities.com/darrylbu/images/headdesk.gif]

Similar Messages

  • Need a regular expression for the text field

    Hi ,
    I need a regular expression for a text filed.
    if the value is alphanumeric then min 3 char shud be there
    and if the value is numeric then no limit of chars in that field.[0-9].
    Any help is appriciated...
    thanks
    bharathi.

    Try the following in the change event:
    r=/^[a-z]{1,3}$|^\d+$/i;
    if (!r.test(xfa.event.newText))
    xfa.event.change="";
    Kyle

  • Help needed regarding regular expressions

    hello
    i need to write a program that recieves a matematical expression and evaluates
    it...in other words a calculator :)
    i know i need to use regular expressions inorder to determine if the input is legal or not ,but i'm really having trouble setting the pattern
    the expression can be in the form : Axxze2223+log(5)+(2*3)*(5+4)
    where Axxze2223 is a variable(i.e a combination of letters and numbers.)
    where as: l o g (5) or log() or Axxx33aaaa or () are illegal
    i tried to set the pattern but i got exceptions or it just didnt work the way i wanted it .
    here's what i tried to do at least for the varibale form:
    "\\s*(*([a-zA-Z]+\\d)+)*\\s*";
    i'm really new to this...and i can't seem to set the pattern by using regular expressions,how can i combine all the rules to one string?
    any help or references would be appreciated
    thanks

    so i'll explain
    let's say i got token "abc22c"(let's call it "token")
    i wan't to check if it's legal
    i define:
    String varPattern = "\\s*[a-zA-Z]+\\d+\\s*";If you want to check a sequence of ASCII characters, longer than one, followed by a single digit, the whole possibly surrounded by spaces -- yes.
    >
    now i want to check if it's o.k
    so i check:
    token.matches(varPattern);
    am i correct?Quite. It's better to compile the Pattern (Pattern.compile(String)), create a java.util.regex.Matcher (Pattern#matcher(CharSequence)), and test the Matcher for Matcher#matches().
    (Class.method -> static method, Class#method -> instance method)
    >
    now i'm having problem defining pattern for log()
    sin() cos()
    that brackets are mandatory ,and there must be an
    expression inside
    how do i do that?First, I'd check the overall function syntax (a valid name, brackets), then whether what's inside the brackets is a valid expression (maybe empty), then whether that expression is valid for that function (presumably always?).
    I might add I'm no expert on parsing, so that's more a supposition than a guide.

  • Need a regular expression for URL

    Regular expression: ^(udp|norm)://(?:(?:25[0-5]|2[0-4]\\d|[01]\\d\\d|\\d?\\d)(?(?=\\.?\\d)\\.)){4}:(6553[0-5]|655[0-2][0-9]\\d|65[0-4](\\d){2}|6[0-4](\\d){3}|[1-5](\\d){4}|[1-9](\\d){0,3})$
    Source: udp://125.3.4.121:23456
    Getting error:java.util.regex.PatternSyntaxException: Unknown inline modifier near index 54
    ^(udp|norm)://(?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)(?(?=\.?\d)\.)){4}:(6553[0-5]|655[0-2][0-9]\d|65[0-4](\d){2}|6[0-4](\d){3}|[1-5](\d){4}|[1-9](\d){0,3})$

    paulcw wrote:
    I can't help wondering if a simpler solution would involve creating a java.net.URL object, passing it the string to be checked, and let URL do the parsing and an initial pass at checking the syntax. Then you could query URL for individual components for further checking (e.g., getting the transfer type to make sure it's one of the kinds you want). This approach would probably be more self-documenting, if nothing else.Nice idea, but java.net.URL doesn't actually do much work at all. It basically takes the protocol part, looks up a handler for it, and delegates everything else to that. The handlers themselves are down in the sun packages (or whatever your Java impl is) and since there isn't one for the OPs protocol, he'd have to write and register his own anyway, which kind-of negates the entire purpose of leveraging it.
    @OP: Paul's suggestion can still be of use. Apache, Codehaus and the like will have written their own protocol handlers, it's worth grabbing the source code for, say, Apache HttpClient, and seeing if they've got anything useful in there. Then again, who's to say that what's a valid URL for this 'norm' protocol, other than whoever designed the protocol?

  • Please Help: Regular Expression Gives Stack Overflow

    Regular Expressions are the bane of my existence. I hate them and everyone seem to have their own slightly different syntax. Anyhow, I have a problem with the below code, as it gives me a stack overflow:
         public static void main(String[] args) throws IOException {
              System.out.print(parseText(readTextFile("c:\\file.txt"))); // the input file is displayed below
    // simple method to test that the regular expression can be matched. it works for simple expression, but not the one below
    // this is the code that causes stack overflow
         public static String parseText(String inputString) {
               Pattern p = Pattern.compile("<tr>(\\s)*<td class = 'abc[0-9]*(\\s)*'>(.|\\s)+</nobr>(\\s)+</td>(\\s)+</tr>");
               Matcher m = p.matcher(inputString);
               m.find();
               return m.group();
    // this method just reads in a text file and returns a String with the whole content
    // this works, but is posted here for completeness
        public static String readTextFile(String filePath)
            File file = new File(filePath);
              StringBuffer contents = new StringBuffer();
              BufferedReader reader = null;
              try {
                   reader = new BufferedReader(new FileReader(file));
                   String text = null;
                   // repeat until all lines is read
                   while ((text = reader.readLine()) != null) {
                        contents.append(text).append(
                                  System.getProperty("line.separator"));
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              } finally {
                   try {
                        if (reader != null) {
                             reader.close();
                   } catch (IOException e) {
                        e.printStackTrace();
              return contents.toString();
        }Below is the content of what I'm feeding the above code as file.txt that results in an error.
       <tr>
            <td class = 'abc1 '>
                <b><a href = 'http://somedomain.com/bla.html' class="a1"> 
                    something 1
                </a></b>   
            </td>
            <td class = 'abc1 '>
                cars 
            </td>
            <td class = 'abc1 ' nowrap align="center">
                ibm
            </td>
            <td class = 'abc1 '>
                <a href = 'http://somedomain.com/bla2.html'>
                    Features
                </a>
            </td>
            <td class = 'abc1 '>
                <nobr>Feb 5, 2009</nobr>
            </td>
        </tr>
       <tr>
            <td class = 'abc1 '>
                <b><a href = 'http://somedomain.com/bla2.html' class="b1"> 
                    something 2
                </a></b>   
            </td>
            <td class = 'abc1 '>
                car 
            </td>
            <td class = 'abc1 ' nowrap align="center">
                sun
            </td>
            <td class = 'abc1 '>
                <a href = 'http://somedomain.com/bla3.html'>
                    Features
                </a>
            </td>
            <td class = 'abc1 '>
                <nobr>Feb 5, 2009</nobr>
            </td>
        </tr>
        Here is some lines from the stack overflow output:
    Exception in thread "main" java.lang.StackOverflowError
         at java.util.regex.Pattern$GroupTail.match(Unknown Source)
         at java.util.regex.Pattern$BranchConn.match(Unknown Source)
         at java.util.regex.Pattern$CharProperty.match(Unknown Source)
         at java.util.regex.Pattern$Branch.match(Unknown Source)
         at java.util.regex.Pattern$GroupHead.match(Unknown Source)However, if I feed the program this shorter version of the input it works (it matches only once and is just the top portion of the original file.txt):
       <tr>
            <td class = 'abc1 '>
                <b><a href = 'http://somedomain.com/bla.html' class="a1"> 
                    something 1
                </a></b>   
            </td>
            <td class = 'abc1 '>
                cars 
            </td>
            <td class = 'abc1 ' nowrap align="center">
                ibm
            </td>
            <td class = 'abc1 '>
                <a href = 'http://somedomain.com/bla2.html'>
                    Features
                </a>
            </td>
            <td class = 'abc1 '>
                <nobr>Feb 5, 2009</nobr>
            </td>
        </tr>I did some google searches, but the problem appears to do with how I crafted my regular expression. The solution didn't make sense to me.... Anyone help me please as I spent a big portion of the day already!

    @flounder,
    Wow, hold your horses...
    That comment was meant to denote my level of frustration with this since I had spent a large portion of the day trying to figure it out. It was not intended to designate my issue or time as more important than others.
    I certainly appreciate any help considering nobody is being compensated in any way for helping me.
    @jschell,
    This is intended to be used as a one time deal to automate recapturing data we no longer have in a non-HTML format.
    I appreciate the suggestion though.
    @JoachimSauer
    Thank you for all your help. I appreciate it!

  • Help: Regular Expression question??

    Hello,
    How can I extract the following content using Java Regular expression?
    <tr bgcolor="#333333">
         <td class="title" colspan="4" height="18"> <b>SUPER_1</b> - SUPER_2</td>
    </tr>
    <tr bgcolor="#333333">
         <td class="match-light" width="45" height="18"> </td>
         <td class="match-light" colspan="3" width="286" align="right">March 19 </td>
    </tr>
    <tr>
         <td colspan="4" height="1"></td>
    </tr>
    <tr bgcolor="#cfcfcf">
         <td width="45" height="18"> FT</td>
         <td width="118" align="right">SUPER_3</td>
         <td width="50" align="center"><a class="scorelink" target="details" onclick="showDetails();">999 - 888</a></td>
         <td width="118">SUPER_4</td>
    </tr>From the above contents, How can I define a regular expression for extract the "*SUPER_1*", "*SUPER_2*", "*March 19*", "*SUPER_3*", "*999*", "*888*" and "*SUPER_4*" ????
    Please help.
    Best regards,
    Eric

    Kayaman wrote:
    Why not use a better way than regex, like an actual HTML parser (or XML if you have it well-formed)? People seem to love parsing (or rather, asking help how to parse) HTML with regex for some unknown reason.Indeed.
    Read this (hilarious):
    http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454

  • Open APEX Wiki needs a regular expression mastermind

    Hello,
    And I'm not talking about someone that kinda knows regular expression's, we need one of those sick in the head people that think regular expressions are fun to do on a Friday night :) for some of this wiki work.
    If your interested please email me directly at [email protected]
    Sorry for putting this out here but I'm throwing a wide net on this one and want to kickstart this application.
    Carl

    [Heh, the "not built here", "we can build it better" approach, the bane (and boon!) of all software development]
    Seriously, I don't think Perl regexps are all that "non-standard" as compared to the POSIX standard. They certainly have some quirks w.r.t zero-length forward/backward assertions (?pattern) and they might have some more character classes [[:pattern:]] but on the whole it is the same stuff.
    Yes, given that TWiki is built entirely in Perl, it might have more than its fair share of "Perl-isms" that might make converting to Oracle regexps untenable, but there is no reason to use the TWiki "dialect" of wiki-markup. There are tons of Wiki dialects around, Google for keywords like "wiki dialect markup convert html" finds lots of relevant hits (like the link I posted earlier).
    All I am saying is that it might make sense to not reinvent the wheel especially for something as complicated as regular expressions.
    References:
    http://www.ayni.com/perldoc/perl5.8.0/pod/perlre.html
    http://builder.com.com/5100-6388-5224420.html
    http://www.oreilly.com/catalog/oracleregex/index.html
    http://www.redwingnet.com/hioug/Presentations/Regular_Expressions/Oracle10gRegularExpressions.htm

  • Help needed in Regular Expression

    I have been give a task to replace all table_name (Emp) in Procedure p1 to Table_name(Employee).
    Can anyone help me ?
    Regards,
    Prathamesh

    Hi, Prathamesh,
    REGEXP_REPLACE ( txt
                , '(^|\W)emp(\W|$)'
                , \1employee\2'
                )will return a copy of txt with the full word 'emp' replaced by 'employee'.
    For example, if txt is:
    emp foo a=emp  temp emp_name emp.bthe expression above will return
    employee foo a=employee  temp emp_name employee.b 
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statments) and the results you want from that data.

  • Help needed on Regular expressions

    Hi All,
    I need to extract the value of the below 2 tags
    1. <S143:name> (main tag not the <S143:name> of <S143:specCharacteristicProperty>)
    2. <S110:stringValue>
    <S211:falloutCharacteristic>
                   *<S143:name>String</S143:name>*               <S143:value>
                        <S110:stringCharacteristicEnum>
                             *<S110:stringValue>String</S110:stringValue>*                         <S110:stringRestriction>
                                  <S110:minLength>0</S110:minLength>
                                  <S110:maxLength>0</S110:maxLength>
                                  <S110:pattern>String</S110:pattern>
                             </S110:stringRestriction>
                        </S110:stringCharacteristicEnum>
                   </S143:value>
                   <S143:description>String</S143:description>
                   <S143:specCharacteristicProperty>
                        <S143:name>String</S143:name>
                        <S143:value>String</S143:value>
                   </S143:specCharacteristicProperty>
              </S211:falloutCharacteristic>Any pointers on this?
    Thanks in advance.

    Well..Personally i feel regex on this would be a tough job. You try creating a temp file and pass your xml string along. Then try using org.w3c.dom on it. Something like :
    String xmlString = "Your XML String";
              File temp = null;
              try {
                   temp = File.createTempFile("test",".xml");
                   temp.deleteOnExit();
                   BufferedWriter out = new BufferedWriter(new FileWriter(temp));
                   out.write(xmlString);
                   out.close();
              } catch (IOException e) {
                   e.printStackTrace();
              }Or you could actually create a physical file, if space and credentials permit, access it from a physical location and try using DOM in it.. Cant think of anything better now.

  • Help: Regular Expression - 2

    Hi,
    Good Day to All..
    Database : 11g
    Col1
    Louie: The Complete First Season [2 Discs] [DVD/Blu-ray]
    Snow White and the Seven Dwarfs [Blu-ray/DVD] - Bonus Disc
    About Last Night... [WS] [Blu-ray]
    High3:[Extended] [3 Discs] [Includes Digital Copy] [BR]
    High4: The [Extended] [3 Discs] [BR]
    Output should show in the below format:-
    Col1
    Louie: The Complete First Season [Blu-ray]
    Snow White and the Seven Dwarfs [Blu-ray] - Bonus Disc
    About Last Night...[Blu-ray]
    High3: [BR]
    High4: The [BR]
    Even if my column contains [Blu-ray/DVD] or [DVD/Blu-ray], i have to replace [Blu-ray] and for other [xxx] braces section has to be removed.
    Query which used and worked out for first three column values :-
    SELECT col1,
      REPLACE(regexp_replace (regexp_replace (col1, '\[.*?Blu.*?ray.*?\]' , '{Blu-ray}' , 1 , 1 ,'i') ,'\[.*?\]') , '{Blu-ray}' , '[Blu-ray]')
      new_col1
    FROM tablename
    WHERE col1 LIKE '%Blu-ray/DVD%' OR col1 LIKE '%[DVD/Blu-ray]%'
    OR col1 LIKE '%[Blu-ray]%'
    OR col1 LIKE '%[BR]%'Need the solution for [BR] column values.
    Thanks ...

    One way is to keep nesting your regexps:
    SQL> with tab1 as
      2  (
      3  select  'The Complete Season Three [3 Discs] [Blu-ray] - Disc 1' col1 from dual union all
      4  select  'Another movie [5 Discs] [DVD/blu-ray] - Disc 1' col1 from dual union all
      5  select '(500) Days of Summer [2 Discs] [Includes Digital Copy] [BLURAY/DVD]' col1 from dual union all
      6  select 'High3:[Extended] [3 Discs] [Includes Digital Copy] [BR]' col1 from dual union all
      7  select 'High4: The [Extended] [3 Discs] [BR]' col1 from dual
      8  )
      9  select
    10  replace(
    11     replace(
    12        regexp_replace(
    13           regexp_replace(
    14              regexp_replace(
    15                 col1,
    16                 '\[.*?Blu.*?ray.*?\]', '{Blu-ray}', 1, 1, 'i'
    17              ),
    18              '\[BR\]', '{BR}', 1, 1, 'i'
    19           ),
    20           '\[.*?\]'
    21        ),
    22        '{Blu-ray}',
    23        '[Blu-ray]'
    24     ),
    25     '{BR}',
    26     '[BR]'
    27  ) test2
    28  from tab1
    29  ;
    TEST2
    The Complete Season Three [Blu-ray] - Disc 1
    Another movie [Blu-ray] - Disc 1
    (500) Days of Summer [Blu-ray]
    High3:   [BR]
    High4: The   [BR]The regexp expression in line 16 take [<anything>Blu<anything>ray<anything>] and turn it into '{Blu-ray}. (The original from your last question.)
    The regexp in line 18 take [BR] and turn it into {BR} (again the 'i' parameter makes it case in-sensitive so it also catches [Br] [br] and [bR].)
    Then line 20 removes all other [] bracket expressions.
    Line 22-23 turns {Blu-ray} back into [Blu-ray] and 25-26 turns {BR} into [BR].
    You can keep nesting this.
    The trick is first to turn [something] into {something}, before you remove all other [], and then turn the {something} into [something].
    As with the [<anything>Blu<anything>ray<anything>] expression you can also catch the data even if Blu-ray is not spelt exactly right.
    And if you also find cases with for instance [BR/DVD] and wish to turn that into [BR], then you add some suitable .*? in line 18 the same way as line 16 ;-)
    Maybe you should consider selecting all bracket expressions in your data in order to get an overview of how many different bracket expression you have to nest?
    Edit:
    Couldn't resist trying that ;-)
    SQL> with tab1 as
      2  (
      3  select  'The Complete Season Three [3 Discs] [Blu-ray] - Disc 1' col1 from dual union all
      4  select  'Another movie [5 Discs] [DVD/blu-ray] - Disc 1' col1 from dual union all
      5  select '(500) Days of Summer [2 Discs] [Includes Digital Copy] [BLURAY/DVD]' col1 from dual union all
      6  select 'High3:[Extended] [3 Discs] [Includes Digital Copy] [BR]' col1 from dual union all
      7  select 'High4: The [Extended] [3 Discs] [BR]' col1 from dual
      8  )
      9  select
    10  bracket_exp,
    11  count(*) cnt
    12  from (
    13     select
    14     regexp_substr(tab1.col1,'\[.*?\]',1,r.r) bracket_exp
    15     from tab1
    16     cross join (
    17        select level r
    18        from dual
    19        connect by level <= 10
    20     ) r
    21  )
    22  where bracket_exp is not null
    23  group by bracket_exp
    24  order by cnt desc
    25  ;
    BRACKET_EXP                                                                CNT
    [3 Discs]                                                                    3
    [Extended]                                                                   2
    [BR]                                                                         2
    [Includes Digital Copy]                                                      2
    [Blu-ray]                                                                    1
    [5 Discs]                                                                    1
    [2 Discs]                                                                    1
    [BLURAY/DVD]                                                                 1
    [DVD/blu-ray]                                                                1
    9 rows selected.This is just a piece of one-off code to help you analyze your data and discover which bracket expressions you need to care about.
    It is not necessarily optimal, and I have assumed there will be no more than 10 bracket expressions (you could raise that number if you wish.)
    Possibly you might consider:
    upper(regexp_substr(tab1.col1,'\[.*?\]',1,r.r)) bracket_expto count as identical those bracket expressions that are alike except for lower/upper-case.
    Edited by: Kim Berg Hansen on Sep 14, 2011 10:18 AM

  • Need help with Expressions to get the sum of rows between dates

     Date              Total
    8/06/2010     $2000
    8/10/2010    $5000
    8/28/2010      $2500
    9/10/2010    $5000
    9/16/2010   $2000
    9/25/2010   $7000
    9/28/2010     $2500
    I need sum of rows based on month. I have tried  following syntax. It did not work, which is returning $0.  Appreciate any help i get.
    =sum(iif(Date.value>="8/01/2010" AND Date.value<="8/30/2010",Total.value,0))

    Hi RG K,
    According to your description, you want to calculate sum of total based on month use expression, but the expression does not work. If that is the case, please refer to the following steps:
    In design surface, right-click Insert and click Text Box.
    Right-click inside of the text box, then click expression.
    In Expression text box, type the expression like below:
    =sum(iif(Fields!Date.Value>="8/01/2010" AND Fields!Date.Value<="8/30/2010",Fields!total.Value,CDec(0)))
    In this expression, the data type of total is Decimal, so we need to convert 0 to Decimal use CDec() function. If data type of total is Double, we need to use CDbl() function.
    The following screenshot is for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Need help with Expression

    I need to search and replace several Title Tags with
    information such as "<b>Almond Oil (5 ml)</b>
    </font> <hr size="2" noshade>" (without quotes). What
    expression do I use to indicate "everything between the >b>
    and </b> as this information changes?

    Hi,
    Assuming you are using the database is SQL Server:
    SELECT [CustomerID]
    ,[Quantity]
    ,[Unit Price]
    ,[Contract Price]
    ,[Total] = CASE WHEN [On Contract] = 'Yes' THEN [Quantity] * [Contract Price]
    WHEN [On Contract] = 'No' THEN [Quantity] * [Unit Price] END
    FROM [Customers]
    Modify the SQL to suit your need.
    Hope this helps.
    ~J.

  • Need help with expression builder issue

    Hi all
    I'm hoping someone can help with an issue I'm having. I'm creating a database for a manufacturing joinery. For 1 of my forms, Ive to create a despatch form which includes order details along with customer details. Some customers can have contracts in which
    they get a fixed price on certain item. This is where the problem lies.
    For my customers table, I have a field called "On contract" which is a Yes/No field. I've created a query to attempt to make this form. I'm having trouble with adding a total column at the end of this query. Quantity,Unit Price, Contract Price
    are also in the query. I've been trying to build an expression to say like;
    iif [on contract] = "Yes", [Quantity] * [Contract Price]
    iif [on contract] = "no", [Quantity] * [Unit Price]
    It obviously wont work, what am I doing wrong?
    Thanks in advance

    Hi,
    Assuming you are using the database is SQL Server:
    SELECT [CustomerID]
    ,[Quantity]
    ,[Unit Price]
    ,[Contract Price]
    ,[Total] = CASE WHEN [On Contract] = 'Yes' THEN [Quantity] * [Contract Price]
    WHEN [On Contract] = 'No' THEN [Quantity] * [Unit Price] END
    FROM [Customers]
    Modify the SQL to suit your need.
    Hope this helps.
    ~J.

  • Need Help on Express Language

    Can Anybody please help me out how express language works and if possible with examples.
    Thanks for your help.
    Gajendra Nagapurkar
    [email protected]

    the reference guide has a full tutorial on the language. if you know xml and any programming language, you should have no trouble learning it.
    Dana Reed
    AegisUSA
    Denver, Co
    773.412.3782

  • Need a Regular Expression pattern in Java

    Hi,
        Thanks in advance for your help. I have to replace a string if it's not available inside any single quote.
       e.g.
                   name = 'abc12namexyz234' or name='def234namewsr345name' and name like '%ab123name345rt%'
          In the above I've to replace "name" with "ApplicantEntity.name" but I don't want to replace the string that is available inside the single quote i.e. 'abc12namexyz234'. The result after the replacement should be:
                   ApplicantEntity.name= 'abc12namexyz234' or ApplicantEntity.name='def234namewsr345name' and ApplicantEntity.name like '%ab123name345rt%'
         I am trying to find a appropriate regex. But still no success on that. Please Help....
    Thanks,
    Utpal

    .* matches with any character occuring 0 or more times (except newline characters)
    The problem is more likely to be that you really mean any character once or more times (any number of times include 0 times)
    To do this you need .+

Maybe you are looking for

  • Delete the parent records and child table records at a time

    hi all; I am facing the pbm like to delete the all records in child table and corresponding records in parent table at a time. so I want to delete the all the records in child table and corresponding parent records in parent table by using single SQL

  • G5 iSight issue

    Please read this. http://macteens.com/forums/index.php?showtopic=9368&st=0 This is about my mac, to take or not to take in for service? Can I fix this on my own?

  • Table Name - For Authorization objects and fields.

    Hi Could any  one let me Know In which Table Authorization Objects and Authorization fields are stored. Thanks N Regards. Priya

  • What will happen when,,,

    I have two email accounts on my iphone 3Gs running iOS 4.1. One of the accounts (a pop account from a former employer), is no longer valid but I would like to save the emails. I only have these emails on the phone. If I update to iOS 4.2 or use the r

  • How can I get Firefox to store the larger FLV Files in Cache ?

    I use Cache Viewer Revisited to save cache files & for some reason larger FLV Files won`t store in the FireFox Cache... Even under "about cache" Large FLV Files show as 0 in size