Reguler expression - doubt

hi, i have a doubt with "regular expression".
My problem is, i have these words "int soma(int num,int num2 ){"
i will need to catch a word "soma" using regular expression..
Anyone kown to do this???
Thanks..

hi, i have a doubt with "regular expression".
My problem is, i have these words "int soma(int
num,int num2 ){"
i will need to catch a word "soma" using regular
expression..You don't state your requirement precisely.
Lately your type of vague posts abound on public fora.
Devolution?
A stab in the dark:
String regex = "(?<=\\s)\\p{javamethodname}+(?=\\()";

Similar Messages

  • Reguler Expression

    Hi,
    Can anybody tell me some documentation to learn Reguler Expression.
    Thanks&regards,
    Chandan

    Regex Buddy is worth every penny. It even has a setting for Oracle regular expressions, as there many flavors of regex out there.
    Also, you can take a look at this package body as it's filled with regexp_substr and regexp_replace examples. The goal of that package is to transform Mediawiki markup into HTML, which might help you understand some of the procedures.
    Tyler

  • Reguler expression for textInput

    How to restrict text input using reguler expression for First character is only in [a-zA-Z ].
    Ex.  AG67587
          adhsgfdsfg
          a78878

    you could use this
    http://stackoverflow.com/questions/1679886/text-input-restrict-in-flex3-air
    i don't like the idea of dynamically changing the restrict property though.
    you'll probably have to listen for the textInput or changing event and then manually test your regex and adjust the textinput.text property as appropriate.
    from the adobe docs for changing event
    Dispatched before a user editing operation occurs.   You can alter the operation, or cancel the event   to prevent the operation from being processed.

  • Java regular expressions Doubt

    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    public class ArrayExample {
        public static void main(String[] args) {
             String message = "FAMT/4,";
             Pattern pattern = Pattern.compile("(\\w*)(/)(\\d*)(,)(\\d*)");
              Matcher matcher = pattern.matcher(message);
                 if (matcher.find()) {
                      System.out.println("matcher.group(0) : "+matcher.group(0));
                      System.out.println("matcher.group(1) : "+matcher.group(1));
                      System.out.println("matcher.group(2) : "+matcher.group(2));
                      System.out.println("matcher.group(3) : "+matcher.group(3));
                      System.out.println("matcher.group(4) : "+matcher.group(4));
                      System.out.println("matcher.group(5) : "+matcher.group(5));}
    Outbut
    matcher.group(0) : FAMT/4,
    matcher.group(1) : FAMT
    matcher.group(2) : /
    matcher.group(3) : 4
    matcher.group(4) : ,
    matcher.group(5) :
    Could Someone Explain me the output. I searched a lot on group functions and not finding anything that will clear my doubt on the output

    Group zero represents the whole match. The rest are numbered according to their positions within the regex: the first set of parentheses is group one, the second set is group two, etc.. Groups can be nested, so you actually go by the position of the opening parenthesis, '('.

  • Regular expression doubt

    hi all
    I having input data as SHASHANK:ABA:DEF:GHI:JKL
    and output should come as ABA
    I tried as below but am getting output as JKL
    I need it using regular expressions (am trying to learn how regular expressions can be useful)
    please any one help me
    SELECT REGEXP_SUBSTR('SHASHANK:ABA:DEF:GHI:JKL' ,'[^:]*$',1) FROM DUALRegards
    shashank .k
    Edited by: maddy on 10 Jan, 2012 11:28 PM
    Edited by: maddy on 10 Jan, 2012 11:28 PM
    Edited by: maddy on 10 Jan, 2012 11:28 PM

    HI,
    Try this..
    SELECT REGEXP_SUBSTR ('SHASHANK:ABA:DEF:GHI:JKL', '(ABA)', 1, 1) AS re
      FROM DUALThanks,
    P Prakash

  • Case expression doubt

    hi all,
    which is better to use in below two query's.
    select empno from emp where deptno=10
    union all
    select empno from emp where deprno=20
    or
    select
    case when deptno=10 then empno end case ,
    case when deptno=20 then empno end case
    from
    emp
    which is better?
    will case expression in select statement will effect the performance?
    regards
    shashank .k

    Hi,
    shashank .kura wrote:
    hi thanks for reply ,
    now consider these two Please try the queries yourself before posting them. Ask specific questions, such as "Why does the first query produce ...?" or "I though the second query would produce ... using the standard scott.emp table. Why doesn't it?"
    select empno,null from emp where deptno=10
    union all
    select null,empno from emp where deptno=20The query above will only produce results for rows where deptno=10 or 20 (a total of 8 rows in the standard scott.emp table).
    and
    select case when deptno=10 then empno else null end case ,
    case when deptno=20 then empno else null end case from emp order by 1,2This second query will produce one output row for every row in the table (14 rows in the standatd scott.emp table. 8 of those rows will be the same as returned by the first query, and the other 6 will have NULL in both columns.) Also, both columns have the same alias, CASE. (The keyword to end a CASE expression is just END. If you say END CASE, then CASE is taken to be a column alais.)
    The following gets the same results as your first query:
    select  case
             when deptno=10 then empno
                           else null
         end                    AS empno_10
    ,     case
             when deptno=20 then empno
                           else null
         end                    AS empno_20
    from      emp
    WHERE     deptno     IN (10, 20)
    ;This will be more efficient than a UNION, because it only has to make one pass through the table.
    Edited by: Frank Kulash on Aug 19, 2011 10:26 AM

  • Regula expression question

    If I want to replace everything in a string that is between two spaces. I can do:
    There is a space before the d and after the f.
      1  select regexp_replace('abc def ',' [^ ]+ ','!')
      2* from dual
    SQL> /
    REGE
    !defHow do replace only digits, [:digit:] 012345789 between 2 spaces?
    Edited by: Guess2 on Mar 16, 2012 12:48 PM

    Hi Guess2,
    Perhaps you just want:
    select replace('abc def ',' ')
    from dual;See this:
    SQL> select replace('abc def ',' ') as repl
      2   from dual;
    REPL
    abcdef
    SQL>So, as you see, it's not necessary, in the case you have, to use regexp_replace. But, if you want absolutely to use regexp_replace, you can issue:
    SQL>  select regexp_replace('abc   def ',' ') as repl
      2   from dual;
    REPL
    abcdef
    SQL>Is abcde the output you wanted from your initial string?

  • Confused with regual expressions

    Hi all,
    Many many thanks for your help so far. This is one more
    question
    I am trying to contruct a regula expression that will remove
    from a text inpu ttwo characters: a) any panctuation (? commas,
    etc) b) remove any white space at the end of the line. This is what
    i have so far:
    on mouseDown (me)
    m = sprite(me.spriteNum).member
    re ="(/\s+$/ +\W)" -- regexpression describing what you want
    to remove
    m.text = RegExp_Replace(m.text, re, " ", "g")
    end
    Nothing seems to happening! Any ideas what is wrong with it?
    I suspect that something must be wrong with the regular expression
    itself (i am completely new at these regular expressions)
    Many thanks

    Hi,
    Glad you worked it out. Just on a side note, remember not to
    confuse 'strings' with field and text members ie
    aMember = member("foo")
    aString = aMember.text
    aString = "abcdef"
    aMember.text = aString
    (it can get confusing becuase fields can - much of the time -
    be referred to as if they are a string as well as a member with a
    text property)
    Cheers,
    Luke

  • 3 hubs & 4 engineers in 5 weeks and hours on the p...

    I've been using computers since the VIC-20 and the internet for about 15 years. I have been building PCs and repairing hardware & software issues since Win95. I think I have a fairly good grasp on computing & internet problems, though it's by no means extensive and I know when I'm moving into a grey area!
    My mother has been a BT home broadband user for a couple of years now, with the curvey black, non-phone type of router. Until about 5 weeks ago she had no problems even though she lives on the 'limit' regarding distance from her exchange (o2 wouldn't connect her because of this, but BT did).
    The computer connects to the hub via the Cat5 cable supplied with the router.
    I live 70 miles away and can only visit on weekends but about 3 weeks ago I popped in to see if I could diagnose the problem of broadband dropping where the router's 'b' light flashes yellow and won't stay blue long enough to get the home page up.
    With the computer off, the router's broadband status is OK - 'b' lit up in blue.
    When the computer gets into Windows the 'b' light starts flashing orange and the broadband connection is lost.
    A check on the computer's network socket shows solid LED for connection and flashing LED for communication.
    Connection status shows that the router has assigned a proper internal IP (192.x.x.x as opposed to 169.x.x.x) and Windows considers the connection good.
    Pull out the network cable and the router gets broadand back... reconnecting the cable results in broadband dropping again.
    Wireless connections do not cause issue and the broadband only drops when the computer is connected through a cable.
    I phoned the Indian crib-sheet readers and spent half an hour explaining my findings and only got passed up a level after I complained bitterly that to ask me to check wireless internet connectivity was pointless at a time when the broadband light showed no connection!
    The 'manager', as he announced himself, didn't have much of a clue but eventually agreed that if the previous 3 engineers had established there werre no faults at the exchange, on the house wiring or the telephone line, then the fact that the router is happy to give the computer an IP but cannot maintain broadband connection, the issue must lie with the router.
    Since my mother's original contract period had expired, she eventually agreed to sign up again to receive a free hub, which arrived two days later and exhibited exactly the same problems.
    Earlier this week, a 4th engineer came out, installed new in-home phone cabling & more new filters, plugged in the new type3 hub that didn't work at all, and announced that the problem was with the computer's network socket. She phoned me and I spoke to the guy, expressing doubt that this was the case since it was getting an IP, but I agreed that this weekend I would fit another 10/100 internal network card and take a wireless dongle just to get it up again.
    I could easily fit a wireless dongle or card but they are occasionally prone to driver issues (especially of the Windows Update kind) so would prefer not to, in order to save my petrol bills and sanity.
    This evening, mum phoned again, to report the latest...
    The engineer that originally came out (the very first time) appeared today (after some more hassling from mum!), checked the all-new wiring and - wonder of wonders - brought in his own laptop.
    Imagine his surprise when he connected wirelessly but then the router dropped broadband almost as soon as the network cable was used!
    He phoned some BT broadband/networking bigwigs somewhere in Wales and no-one has any idea what's going on.
    So there we have it; unless mum is the unluckiest person on BT's books and has had two faulty replacement routers, there's a problem at the exchange that doesn't like her computer... I'm left wondering if there's some sort of account block on her PC!
    Has anyone here heard of something similar? Any suggestions to try? Any help would be greatly appreciated - mum's Farmville won't harvest itself, you know!

    Hello Chewie,
    Could it be that you are on the very limit of having a decent copper connection to the exchange? As soon as you start sending packets, the errors are so great that one end or the other terminates the connection(?).
    If possible, it would be good to see the ADSL statistics from the router:
    http://192.168.1.254, click on A-Z in the top right, then ADSL settings, enter password.

  • Converting sed regex to Java regex

    I am new to reguler expressions.I have to write a regex which will do some replacements
    If the input string is something like test:[email protected];value=abcd
    when I apply the regex on it,this string should be changed to test:[email protected];value=replacedABC
    I am trying to replace test.com and abcd with the values i have supplied...
    The regex I have come up with is in sed
    s/\(^.*@\)\(.*\)$/\1replaceTest.com;value=replacedABC/i
    Now I am trying to get the regex in Java,I would think it will be something like (^.*@\)(.*\)$\1replaceTest.com;value=replacedABC
    But not sure How i can test this.Any idea on how to make sure my java regex is valid and does the required replacements?

    rsv-us wrote:
    Yep.Agreed.
    Since that these replacements should be done in a single regex.Note that the sed replacement I posted is really made of two replacements! Just like your Java solution would.
    I think once we send this regex to the third party,they will haev to use either sed or perl(will perl do this replacements,not sure though) to get the output.
    Since we are not sure what tool/software the third party is going to use,I was trying to see how i can really test this.Then I read about sed and this regex as is didn't work,so,I had to put all the sed required / and then the regex had become like s/\(^.*@\)\(.*\)$"/1replaceTest.com;value=replacedabcd/iAgain: AFAIK that does not work. I tried it like this:
    {code}$ echo test:[email protected];value=abcd | sed 's/\(^.*@\)\(.*\)$"/1replaceTest.com;value=replacedabcd/i'and the following is returned:test:[email protected] that we will have to send the java regex to the third party,I was trying to see how i can convert this sed regex to java.If I am right,with jave regex,we won;t be able to all the finds and replacements in a single regex..right?...If this is true,this will leave me a question of whether I need to send the sed regex to the thrid party or If I send java regex,they have to convert that to either sed or perl regex.
    One more question,can we do thse replacement in perrl also,if so,what will the equivalent regex for this in perl?
    I can't understand what you are talking about. The large amount of spelling errors also doesn't help to make it clearer.
    Good luck though.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Bridge Doesn't want to Open

    I don't know why, but my Bridge will no longer open.
    There is no loading screen. Just nothing happens when I try and open it.
    also, when I try to connect to mini bridge the pallette comes up, but it doesn't connect.
    what can I do?
    thanks,

    Yooper1
    Welcome to the Apple Discussions.
    In the Finder use the Go menu and select 'Go To Folder'. In the resulting window type
    /Volumes
    and hit return. A Finder window will open at the Volumes Folder. Is there an iPhoto Library Folder there? If so, drag it to the Desktop. Then Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library' and point it at this library. Is it intact?
    1 Why did this happen?
    Hate to answer a question with a question but: What format is this external disk?
    2 How do I fix it?
    Depends on the Answer to my Question.
    3 Is there a better solution to organizing 32,000 photos?
    If you're shooting RAW and high volumes of pics, explore Aperture.
    4 Is iView or Portfolio the way to go?
    Well iView is definitely well thought of, but it's owned by Microsoft now, so folks have expressed doubts about its' future on the Mac. Portfolio is a fine app, but for that money Aperture has many added benefits for working specifically with Photos and especially RAW.
    Regards
    TD

  • When will ID Include Integrated Kindle .mobi Export?

    InDesign Mavens,
    Can anyone shed any light regarding why Adobe has yet to include Kindle .mobi generation (export) as an integrated function in InDesign?
    The release of InDesign CC further illuminates this problem...KDP's latest Kindle Plugin for Adobe InDesign (PERPETUAL BETA) v0.9.7.3 does not appear to support InDesign CC.
    Really...by now...why is it necessary for Adobe to force InDesign users to rely on a third-party, perpetually BETA plugin for so many years in order to gain access to one of the largest (if not the largest) eBook marketplaces?
    WHEN WILL ADOBE integrate Kindle .mobi generation into InDesign?
    Do you want .mobi export integrated into InDesign? Please indicate your request in the comments below (hopefully someone from Adobe InDesign's Product Management group will get the message).

    My apologies for the delayed response. Also, my apologies for the incorrect assumption about InCopy exporting to Word. I should have limited my response to things I have better knowledge of… but in my defense, I had just read this snippet in the InCopy manual and it seemed fairly clear, so I went with it:
    Export InCopy documents
    You can save all or part of an InCopy document in a different file format. In most cases, each component (for example, text frames and graphics) in an InCopy document is exported to a separate file. The exception is exporting an InCopy document to Adobe PDF, which copies all of the text and graphics in a document to a single PDF file.
    Do one of the following:
           To export text, click in the text with the Type tool  .
           To export a graphic, click the graphic with the Position tool  .
    Choose File > Export.
    Specify a name and location for the exported content, and then select a format under Save As Type.
    The XML format appears in the list only if XML tags have been added to the document. If you are exporting text and don’t see a listing for your word-processing application, you might need to export the text in a format that the application can import, such as Rich Text Format. If your word-processing application doesn’t support any of the InCopy export formats, use the Text Only (ASCII) format.
    My assumption was, if InCopy allowed you to export to different file formats, and if it provided a listing of word processor programs, and it gave the option to export to RTF, then Word must be one of the options. Apparently I was wrong. That being said, the point I was making is still valid.
    I am questioning the rationale behind Adobes decision to exclude support for the Amazon Kindle reader format. The reason stated here is, “Kindle uses a proprietary format that is not an open standard so why should Adobe spend the resources developing a solution to support it?” In response, I expressed doubt that this is the true reason because Adobe fails to take this position in other applications and I mistakenly provided an invalid example. So allow me to correct this mistake and reiterate that Adobe does not require that a technology or language be an “open standard” in order to incorporate support for the same.
    These are examples of Adobe products supporting non-standard technologies (that I have personally verified from with the applications):
    Acrobat Pro:      Export to Word and Excel          
    Certainly these formats are not open standards
    Photoshop:        Save as PXR format                      
    Pixar originally created this proprietary format for use with proprietary Pixar Imaging Computers used in medical imaging applications and, of course, animation. Later it was adopted for use in Pixar’s Renderman and Marionette 3D animation programs. I didn’t research other image formats, but my guess is the majority are proprietary and not open standards.
    Fireworks:          Export to Lotus Domino Designer           
    Really? Is this what Adobe considers an open standard?
    Dreamweaver:  Create files of type: ASP + Java Script, ASP + VB Script, ASP.NET C#, ASP.NET VB       
    Obviously these are proprietary Microsoft technology solutions.
    I think this demonstrates Adobe’s position on open standards fairly well, and as to the question of “Why” Adobe should support Kindle: for the same reason Adobe supports all the other, non-standard technologies. Because developers need it and Adobe is in the business of providing tools for developers. With regard to the characterization that Plane Wryter’s workflow is somehow “non-standard” is absolutely ridiculous. Yes, it might be true that the majority of Adobe’s ePub developers have no need for the Kindle tools. However, Plane Wryter and I (and every other independent developer and small ISV) cannot afford to limit our options and exclude potential clients based on (stupid) limitations imposed by our chosen development tools. We must remain flexible in order to survive. Adobe should recognize this and make an attempt to provide for our needs as well as the needs of their big enterprise customers.
    Adobes position on this is a perfect example why I always look for tools created by smaller providers who have a vested interest in catering to the needs of the little guy. That’s why I chose tools from companies like Frame Technology Corp (creators of FrameMaker), eHelp/Blue Sky Software (creators of the RoboHelp product line) Aldus (providers of PageMaker, Freehand, and PhotoStyler), and Macromedia (creators of Flash, Shockwave, and Dreamweaver). I originally began to use these titles when they were competitors of Adobe, but they have since been acquired. It’s unfortunate that Adobe doesn’t see the value in continuing to provide small companies and individual developers with flexible tools. What other option does the little guy have except to look for alternatives from companies who still have an incentive to provide the tools we need?
    In conclusion, I don’t buy the “not an Open Standard” excuse for excluding support for the Amazon formats. It’s an excuse of convenience and one that is not reflected by other Adobe products. The real reason Adobe isn’t providing development tools for Kindle is most likely tied to their Digital Editions reader application. I can see some Adobe Fat-Cat exec sitting at his desk on the 30th floor, with his feet up and chair leaned back, smoking a Gurkha (a very expensive cigar) of course, saying something like, “what kind of sense (puff) does it make (puff puff) to invest money and resources into (puff) a new ePub reader program, then (puuuufff) turn around and offer development tools (puff pu pu puff) for our competitors products? It doesn’t that’s what! Needles to say, we will NOT offer Kindle development tools (puff)”.
    This sounds closer to the truth than that silly line about open standards. I don’t know about the rest of you guys, but I have a thing about being fed a line from a uber-mega-corp that’s acquired the vast majority of it’s product line through shrewd business practices. Do I honestly think they consider my needs as a developer? Naahh, not really. I’m going to follow Plane Wryter’s lead since Adobe leaves no other option.
    One last word of caution to Plane Writer, I don’t like the way Steve Werner wished you luck with Vellum… (nothing personal Mr. Werner) but it almost sounded like “Good luck with Vellum, Adobe will be acquiring them real soon… “  Call me paranoid, but history speaks for itself, doesn’t it? If it’s a good product that’s competing with Adobe, then they will want it. (can you feel the walls closing in?)          

  • Why is my nano not recognized by PC suddenly?

    My 1st gen Nano 4GB works just fine playing music that is already on it. But I got the "USB device not recognized" message when plug it in my Dell PC at work. My computer simply doesn’t see the nano whatsoever! HOWEVER, my 30GB video works just fine with the same computer/iTune (7.5) by using the same USB cable. I then tried both the nano and video at home and I got the duplicated result...
    The nano was sitting in the drawer for the past 5 months since last music loading and it can't be damaged by any means. It can be charged by the USB cable either to the PC or AC adaptor. All the 5R's and other suggested methods did not solve this problem. How the heck in the world and all the sudden that my nano just stop communicating with computer? Did Apple manufactured in a hidden timer to set off the nano therefore it can't be recognized by PC... so I have to buy another iPod???
    Message was edited by: Host

    I took the nano to a local Apple (25 mile) and explained the problem; the guy listened briefly and told me to sign up for the genius bar. Two days later I drove back to Apple for the genius bar appointment, she basically told me that I was SOL, I can either get my nano fixed for $80 or trade it in for a 10% off new nano. I told her that this is really bad and I might not buying Apple again. I guess she did not care much since Apple store was packed of customers and business is still good these days...
    Thanks for some of you shared your experiences; at least I am not alone for this problem. Also like Darkside0418 said "these forums dont help much" other than getting treated like idiot and bonehead for expressing doubts to Apple... (Why is this your business even you are a regular contributor???) I wish the host did not modify the original post because it does not change my doubts to Apple.

  • Cl_abap_matcher

    Dear Abapes,
    Im trying to undustand reguler expression, so my problem is i'll tack some samples in the net there call <b>cl_abap_matcher</b> class, In the SE80 I couldnt get from that.
    any body can help me brows this or any reguler exprission samples.. please hep me

    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9d6ceabb211d73e10000000a1553f6/frameset.htm

  • Moving software from Mac to Windows

    I took the easy way out & had Windows set up by the Apple retailer when the computer was purchased; however I now need to install new hardware in the Windows environment. When the CD containing the drivers, etc. is inserted, its icon is shown on Mac's desktop & it also appears in the Finder window. So far so good.
    However, try as I might, I just cannot find the way to move these program files over to Windows, or have Windows open the .exe installation file, etc. (Ordinary files moved across to a Windows application, such as a spreadsheet, have never presented any problems!). It is a total block!
    Advice greatly appreciated.

    The answer to that is.......DESPERATION!
    When I loaded the software/drivers CD, it came up with the install menu, reached the "copying electronic registration files - 98%", then froze with not the slightest trace of Windows. I tried what I could but that install screen came back to haunt me; it took half an hour of help from the Apple Support Team to restore things to normal functioning.
    So I just wondered if there was another way around the installation problem? Alternatively, as I was trying to use the same hardware linked to both the Mac & a PC (it works on the latter &, if the manufacturer can be believed, should on the former) to which Apple expressed doubts, perhaps the simple solution would be to invest in a new Mac dedicated piece of hardware.

Maybe you are looking for

  • Automatic PO creation when neither Contract or fixed vendor found

    Hi All,     This is continuation of my previous thread. the issue has not been resolved and needs suggestions. SRM 5.0 ECS SP15. The issue happens sporadically when SRM SC is created without contract item (catalog/direct mat). So, when SC is created

  • Restoring old phone backup to iphone6+

    Hi, I used iphone 5 and now got the new iphone 6+ and restored backup from the old one. i checked the usage in settings and it shows 2.5 giga of photo in photo library however i only have recent photos in my phone. i just want this 2.5 giga to be rem

  • DB2 parameters for SAP Unicode system

    Hi, Can anybody guide us on specific and important DB2 9.7 parameters for our UNICODE SAP system. The parameters on the note: 1329179 has been already taken into consideration. But if anybody has the experience to set particular parameters please let

  • I'm new user. I like to acquire, save and process the dynamic signal data

    My signal is from 5-10KHz and I'm using NI4551. I would like to acuire data for 5-10 sec, save it on the file and then perform frequency spectrum analysis. I realy appreciate if somebody refers me a vi, that I can modify to perform this particular ta

  • Time machine with WD portable 250gb external hard drive

    im using the WD 250GB external hard drive to backup my HD...im very new to MAC and time machine. I have a MacBookPro. My question: do you recommend i back everything up with time machine on this external WD HD? thanks for your help