..if i say : matching with regex?

Hi,
i've hope that this is the place to post my little question.
i've tried many many times to matching a String alfanumerica (
w+) with blank(
s+) but wiht negative
response <img class="emoticon" src="images/emoticons/plain.gif" border="0" alt="" />
this is a main to try this "game":
public Class Game{
public sattic void main(String [] args){
boolean iCanWin = true;
String toMach = "i want win! ";
if(iCanWin == toMatch.matches(regex))
System.out.printl("Congratulation Thank You Very Mach");
else
System.out.println("Thak You!");
thak you .

Ops , sorry ...
I've tried with these regex :
String regex="^(\\w+ \\s+ \\w+ \\!)$";
String regex2 = "^(\\w+)\\s*\\'!'$";
but don't work :-((.

Similar Messages

  • HT4913 i am trying to get my computer and my wifes computer on my itunes match.  i did the add a computer function and it says that this computer is already associated with an apple id...if you use itunes match with your apple id etc for 90 days...please

    i did the add a computer function and it says that this computer is already associated with an apple id...if you use itunes match with your apple id etc for 90 days...please explain.  is this going to screw my wifes account up? 

    If you both have seperate iTunes Store accounts then basically, yes, it is going "screw up" your wife's account.
    iTunes Match is designed as a single-user service which is associated with one and only one iTunes Store account ID. If you have subscribed on your account and want to activate the service on another computer that is already signed in with an account the present account must be signed out and then iTunes signed into your account. This means the other computer will have complete access to your account and will only be able to make purchases on your account. iTM is not designed to be signed in and out at will. If she has apps purchased with her iTunes Store account they will not be able to be updated.

  • I bought iTunes Match; nonetheless, on iTunes Radio I routinely get ads.  Apple says that with iTunes Match one should not get ads.  Whaddup?

    I bought iTunes Match; nonetheless, on iTunes Radio I routinely get ads.  Apple says that with iTunes Match one should not get ads.  Whaddup?

    Requiring Match to be switched on, even though we have paid, to get ad free Radio can be costly.  Why?
    Because if you want to listen to Radio with cellular data (not much data required) you are also agreeing to Match over cellular which can suck data like you won't believe.

  • I have been trying to update my cc info and for some reason it has kept saying that the cc info does not match with the bank so the transcation failed every time I was trying to download something even when it's free but my cc got charged $1.- each time.

    I have been trying to update my cc info but for some reason it has kept saying the cc info did not match with the bank info so the transaction failed every time I made an attempt to download something even it was free. However, I saw my cc online got charged $1.00 everything I was trying to update my cc info ...why?

    Im wondering why my post hasn't been answered yet.  I did file a report with the BBB and I had a rude representative from Verizon call me named Steve. He said I can file all of the reports I want and I will just keep getting calls from him.  I can understand why my phone couldn't be replaced because of the small crack.  I guess I have to eat that one (but it sucks because the lollipop update is what caused the problems)  but what about all of the data overage I had to pay for for trying to fix this phone because of a lollipop update.  I dont think it is fair to have to pay that as well. In addition,  because I have an east coast phone number but live on the west coast, I cannot have tech support after 8pm.  Verizon has cut this off.  Im very dissatisfied and I have been a customer of Verizon for 13 years.  Im hoping for a response this time.

  • ITunes Match says "Matching your music with songs from iTunes store".

    iTunes Match says "Matching your music with songs from iTunes store". This will not finish. I cannot put any new songs on iTunes Match. This started today. It was working fine. I have deleted my entire library and I can't even get one song to go through. Thoughts? I've been working with this all day. I have uninstalled iTunes, downgraded iTunes, upgraded iTunes again. Finally, I erased all data...Libraries...playlist data, etc.. I'm extremely frustrated now. I had synced about 4,000 songs since September and it had been working fine. Any help would be great.

    I think your right that it is not completely impossible to match any song, although I have tried several songs from several different albums and none have worked so far. The weird thing is is that I have the same Match account on two different computers, and when I match a song on one and it gets stuck, I can see it in my library on the other computer but its greyed out. Not sure what that means. It has worked perfeclty for me since I got it in March, so I'm hoping whatever it is gets sorted out by Apple. If it starts working for any of you please let me know in this discussion!

  • HT1491 I am not able to purchase more coins for matching with friends. The window says to contact iTunes support to complete my purchase.  How do I do this?

    iTunes is not letting me purchase coins for matching with friends. The message tells me to contact iTunes support to complete the transaction. How do I do this?

    You can contact iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Problem with regex

    sorry about my english.
    i'm working with large xml file which it data like this
    (this is sample data)
    <DOCTYPE lewis SYSTEM "lewis.dtd">
    <REUTERS TOPICS="NO" LEWISSPLIT="TEST" CGISPLIT="TRAINING-SET" OLDID="20436" NEWID="21001">
    <DATE>19-OCT-1987 15:37:46.03</DATE>
    <TOPICS></TOPICS>
    <PLACES></PLACES>
    <PEOPLE></PEOPLE>
    <ORGS></ORGS>
    <EXCHANGES></EXCHANGES>
    <COMPANIES></COMPANIES>
    <UNKNOWN>
    F
    f2882reute
    f f BC-CITYFED-FINANCI   10-19 0013</UNKNOWN>
    <TEXT TYPE="BRIEF">
    ******<TITLE>CITYFED FINANCIAL CORP SAYS IT CUT QTRLY DIVIDEND TO ONE CENT FROM 10 CTS/SHR
    </TITLE>Blah blah blah.
    </TEXT>
    </REUTERS>
    <REUTERS TOPICS="YES" LEWISSPLIT="TEST" CGISPLIT="TRAINING-SET" OLDID="20435" NEWID="21002">
    <DATE>19-OCT-1987 15:35:53.55</DATE>
    <TOPICS><D>crude</D><D>ship</D></TOPICS>
    <PLACES><D>bahrain</D><D>iran</D><D>usa</D></PLACES>
    <PEOPLE></PEOPLE>
    <ORGS></ORGS>
    <EXCHANGES></EXCHANGES>
    <COMPANIES></COMPANIES>
    <UNKNOWN>
    2873reute
    r f AM-GULF-PLATFORM   10-19 0101</UNKNOWN>
    <TEXT>
    <TITLE>HUGE OIL PLATFORMS DOT GULF LIKE BEACONS</TITLE>
    <AUTHOR>    By ASHRAF FOUAD</AUTHOR>
    <DATELINE>    BAHRAIN, Oct 19 - </DATELINE><BODY>Blah blah blah
    </BODY></TEXT>
    </REUTERS>
    <REUTERS TOPICS="YES" LEWISSPLIT="TEST" CGISPLIT="TRAINING-SET" OLDID="20435" NEWID="21002">
    <DATE>19-OCT-1987 15:35:53.55</DATE>
    <TOPICS><D>ship</D></TOPICS>
    <PLACES><D>bahrain</D><D>iran</D><D>usa</D></PLACES>
    <PEOPLE></PEOPLE>
    <ORGS></ORGS>
    <EXCHANGES></EXCHANGES>
    <COMPANIES></COMPANIES>
    <UNKNOWN>
    Y
    f2873reute
    r f AM-GULF-PLATFORM   10-19 0101</UNKNOWN>
    <TEXT>
    <TITLE>LIKE BEACONS</TITLE>
    <AUTHOR>    By ASHRAF FOUAD</AUTHOR>
    <DATELINE>    BAHRAIN, Oct 19 - </DATELINE><BODY>Blah blah blah
    </BODY></TEXT>
    </REUTERS>
    <REUTERS TOPICS="YES" LEWISSPLIT="TEST" CGISPLIT="TRAINING-SET" OLDID="20435" NEWID="21002">
    <DATE>19-OCT-1987 15:35:53.55</DATE>
    <TOPICS><D>ship</D></TOPICS>
    <PLACES><D>bahrain</D><D>iran</D><D>usa</D></PLACES>
    <PEOPLE></PEOPLE>
    <ORGS></ORGS>
    <EXCHANGES></EXCHANGES>
    <COMPANIES></COMPANIES>
    <UNKNOWN>
    Y
    f2873reute
    r f AM-GULF-PLATFORM   10-19 0101</UNKNOWN>
    <TEXT>
    <TITLE>HUGE OIL PLATFORMS DOT GULF LIKE BEACONS</TITLE>
    <AUTHOR>    By ASHRAF FOUAD</AUTHOR>
    <DATELINE>    BAHRAIN, Oct 19 - </DATELINE><BODY>Blah blah blah
    </BODY></TEXT>
    </REUTERS>
    <REUTERS TOPICS="YES" LEWISSPLIT="TEST" CGISPLIT="TRAINING-SET" OLDID="20435" NEWID="21002">
    <DATE>19-OCT-1987 15:35:53.55</DATE>
    <TOPICS><D>ship</D></TOPICS>
    <PLACES></PLACES>
    <PEOPLE></PEOPLE>
    <ORGS></ORGS>
    <EXCHANGES></EXCHANGES>
    <COMPANIES></COMPANIES>
    <UNKNOWN>
    Y
    f2873reute
    r f AM-GULF-PLATFORM   10-19 0101</UNKNOWN>
    <TEXT>
    <TITLE>HUGE OIL PLATFORMS DOT GULF LIKE BEACONS</TITLE>
    <AUTHOR>    By ASHRAF FOUAD</AUTHOR>
    <DATELINE>    BAHRAIN, Oct 19 - </DATELINE><BODY>Blah blah blah
    </BODY></TEXT>
    </REUTERS>i'm try to remove article with no topic or two or more topic.
    this is my code.(sorry for not clean the code many testing in it)
    package reuterxmlextraction;
    import java.io.*;
    import java.util.ArrayList;
    import java.util.regex.Pattern;
        public static void main(String[] args) throws IOException {
            int traningcount = 0;
            int testingcount = 0;
            int notopicex = 0;
            int multitopicex = 0;
            int totaltest = 0;
            int totaltrain = 0;
            int countarticle = 0;
            String finalOutput = "";
            File rfile = new File(args[0]);
            try {
                // Open the file that is the first
                // command line parameter
                FileInputStream fstream = new FileInputStream(rfile);
                // Get the object of DataInputStream
                DataInputStream in = new DataInputStream(fstream);
                BufferedReader br = new BufferedReader(new InputStreamReader(in), 1024 * 100);
                String strLine;
                String preOutput = "";
                ArrayList<String> preOutputmod = new ArrayList<String>();
                //Read File Line By Line
                //           while ((strLine = br.readLine()) != null) {
                //preOutput += strLine;
                //System.out.print(strLine);
                int len = (int) (rfile.length());
                byte buf[] = new byte[len];
                fstream.read(buf);
                fstream.close();
                preOutput = new String(buf);
                //System.out.println(preOutput);
                totaltest = count(preOutput, "LEWISSPLIT=\"TEST\"");
                totaltrain = count(preOutput, "LEWISSPLIT=\"TRAIN\"");
                int tempindex = 0;
                while (preOutput.indexOf("<REUTERS ", tempindex) != -1) {
                    //        while(tempindex == 0){
                    int a = preOutput.indexOf("<REUTERS ", tempindex);
                    //System.out.print(a +"\n");
                    int b = preOutput.indexOf("</REUTERS>", tempindex) + 10;
                    //System.out.print(b +"\n");
                    char pre[] = new char[b - a];
                    preOutput.getChars(a, b, pre, 0);
                    preOutputmod.add(String.valueOf(pre));
                    tempindex = b;
                    countarticle++;
                int loop = 0;
                while (loop < preOutputmod.size()) {
                    if (preOutputmod.get(loop).matches(".+<TOPICS>\\s*</TOPICS>.+")) {
                        preOutputmod.remove(loop);
                        notopicex++;
                        continue;
                    if (Pattern.matches(".+[<TOPICS>]?[<D>.+</D>]{2,}</TOPICS>.+\\s*", preOutputmod.get(loop))) {
                        preOutputmod.remove(loop);
                        multitopicex++;
                        continue;
                    } else {
                        finalOutput += preOutputmod.get(loop);
                    loop++;
            } catch (Exception e) {//Catch exception if any
                System.err.println("Error: " + e.getMessage());
            if (args[1] != null) {
                File f = new File(args[1]);
                Writer output = new BufferedWriter(new FileWriter(f));
                try {
                    //FileWriter always assumes default encoding is OK!
                    output.write(finalOutput);
                } finally {
                    output.close();
        static int count(String base, String searchFor) {
            int len = searchFor.length();
            int result = 0;
            if (len > 0) {  // search only if there is something
                int start = base.indexOf(searchFor);
                while (start != -1) {
                    result++;
                    start =
                            base.indexOf(searchFor, start + len);
            return result;
    }problem is that regex in my code don't work.
    i'm not good with regex.
    please help.
    ps.the xml i mentioned is reuter-21578 dataset total size approx 27mb

    Just saying "doesn't work" is meaningless. You need to provide details about exactly what went wrong.
    However, that's irrelevant here, since this is NOT a good job for regex. Use an XML parser.

  • Find Replace from Textfile with regex

    Hello.
    I'm wondering if anyone knows about an existing script that does a find/replace by list like the script "FindChangeByList.jsx" that comes with every InDesign installation.
    This consists of tow parts, the script itself with the functionality and a simple textfile where you have simple one-liners capable of find/replace with regex.
    the Textfile:
    //FindChangeList.txt
    //A support file for the InDesign CS4 JavaScript FindChangeByList.jsx
    //This data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    grep          {findWhat:"  +"}          {changeTo:" "}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double spaces and replace with single spaces.
    grep          {findWhat:"\r "}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space And replace with single returns.
    grep          {findWhat:" \r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space and replace with single returns.
    grep          {findWhat:"\t\t+"}          {changeTo:"\t"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double tab characters and replace with single tab characters.
    grep          {findWhat:"\r\t"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\t\r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\r\r+"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double returns and replace with single returns.
    text          {findWhat:" - "}          {changeTo:"^="}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all space-dash-space and replace with an en dash.
    text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all dash-dash and replace with an em dash.
    The script:
    //FindChangeByList.jsx
    //An InDesign CS5.5 JavaScript
    @@@BUILDINFO@@@ "FindChangeByList.jsx" 3.0.0 15 December 2009
    //Loads a series of tab-delimited strings from a text file, then performs a series
    //of find/change operations based on the strings read from the file.
    //The data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    //For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
    main();
    function main(){
              var myObject;
              //Make certain that user interaction (display of dialogs, etc.) is turned on.
              app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
              if(app.documents.length > 0){
                        if(app.selection.length > 0){
                                  switch(app.selection[0].constructor.name){
                                            case "InsertionPoint":
                                            case "Character":
                                            case "Word":
                                            case "TextStyleRange":
                                            case "Line":
                                            case "Paragraph":
                                            case "TextColumn":
                                            case "Text":
                                            case "Cell":
                                            case "Column":
                                            case "Row":
                                            case "Table":
                                                      myDisplayDialog();
                                                      break;
                                            default:
                                                      //Something was selected, but it wasn't a text object, so search the document.
                                                      myFindChangeByList(app.documents.item(0));
                        else{
                                  //Nothing was selected, so simply search the document.
                                  myFindChangeByList(app.documents.item(0));
              else{
                        alert("No documents are open. Please open a document and try again.");
    function myDisplayDialog(){
              var myObject;
              var myDialog = app.dialogs.add({name:"FindChangeByList"});
              with(myDialog.dialogColumns.add()){
                        with(dialogRows.add()){
                                  with(dialogColumns.add()){
                                            staticTexts.add({staticLabel:"Search Range:"});
                                  var myRangeButtons = radiobuttonGroups.add();
                                  with(myRangeButtons){
                                            radiobuttonControls.add({staticLabel:"Document", checkedState:true});
                                            radiobuttonControls.add({staticLabel:"Selected Story"});
                                            if(app.selection[0].contents != ""){
                                                      radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
              var myResult = myDialog.show();
              if(myResult == true){
                        switch(myRangeButtons.selectedButton){
                                  case 0:
                                            myObject = app.documents.item(0);
                                            break;
                                  case 1:
                                            myObject = app.selection[0].parentStory;
                                            break;
                                  case 2:
                                            myObject = app.selection[0];
                                            break;
                        myDialog.destroy();
                        myFindChangeByList(myObject);
              else{
                        myDialog.destroy();
    function myFindChangeByList(myObject){
              var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
              var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit, myStory;
              var myStartCharacter, myEndCharacter;
              var myFindChangeFile = myFindFile("/FindChangeSupport/FindChangeList.txt")
              if(myFindChangeFile != null){
                        myFindChangeFile = File(myFindChangeFile);
                        var myResult = myFindChangeFile.open("r", undefined, undefined);
                        if(myResult == true){
                                  //Loop through the find/change operations.
                                  do{
                                            myLine = myFindChangeFile.readln();
                                            //Ignore comment lines and blank lines.
                                            if((myLine.substring(0,4)=="text")||(myLine.substring(0,4)=="grep")|| (myLine.substring(0,5)=="glyph")){
                                                      myFindChangeArray = myLine.split("\t");
                                                      //The first field in the line is the findType string.
                                                      myFindType = myFindChangeArray[0];
                                                      //The second field in the line is the FindPreferences string.
                                                      myFindPreferences = myFindChangeArray[1];
                                                      //The second field in the line is the ChangePreferences string.
                                                      myChangePreferences = myFindChangeArray[2];
                                                      //The fourth field is the range--used only by text find/change.
                                                      myFindChangeOptions = myFindChangeArray[3];
                                                      switch(myFindType){
                                                                case "text":
                                                                          myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "grep":
                                                                          myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "glyph":
                                                                          myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                  } while(myFindChangeFile.eof == false);
                                  myFindChangeFile.close();
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change preferences before each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
              var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              myFoundItems = myObject.changeText();
              //Reset the find/change preferences after each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change grep preferences before each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
              var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGrep();
              //Reset the find/change grep preferences after each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change glyph preferences before each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
              var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGlyph();
              //Reset the find/change glyph preferences after each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
    function myFindFile(myFilePath){
              var myScriptFile = myGetScriptPath();
              var myScriptFile = File(myScriptFile);
              var myScriptFolder = myScriptFile.path;
              myFilePath = myScriptFolder + myFilePath;
              if(File(myFilePath).exists == false){
                        //Display a dialog.
                        myFilePath = File.openDialog("Choose the file containing your find/change list");
              return myFilePath;
    function myGetScriptPath(){
              try{
                        myFile = app.activeScript;
              catch(myError){
                        myFile = myError.fileName;
              return myFile;
    This is a very useful and easy to maintain script which even people who cant write scripts (but know how to use regex) can do complex search replace mass replacements.
    Would love to find something like this for FrameMaker 12 (as i can't write scripts myself).
    regards
    daniel

    I have visited that site. The first item in the external link says: "You can also configure Firefox to automatically search for text when you type any characters outside of a text field. When typing in a text field these characters should show up in the text field and not trigger the Quick Find bar. "
    What I am looking for is the exact opposite. Once my first search is entered in the text box, and the info comes back, I want to start typing the next symbol, and have it automatically show up in the text box, not the Quick Find box. That is how it was working up until a couple of months ago.

  • Accounting doc entries not matching with the the entries from j_1ipart2 entries

    Hi,
    After creating PO, I have done MIGO and J1IEX. Now, posted MIRO. The end screen shows a number stating accounting document created.
    I checked the accounting doc in fb03 and the document is displayed over there. I also checked the table for values captured in PART2 of excise. The value displayed in table is not matching with the value displayed in accounting document. Can anyone help?

    Hello Tejas,
    Here is the updated version of the situation.
    After the transaction J1IEX, I got a message saying an 'Accounting Document' has been created. But the accounting document number does not match with the original values. I checked all the tables and found out that the accounting document is not created.
    In this case, I thought of creating an accounting document manually and adding them directly to the table.
    Here are my questions,
    -Can I manually create an accounting document for multiple line items?
    -Few tax values should be split and should go to 2 different GL accounts. so how to do this if I am creating it manually
    -Or can I delete the values captured during 'J1IEX' in the table and reopen the GR so that the t-code j1iex can be processed again?

  • Account Currency is not matching with document currency

    Hi,
    In Sales A/R Invoice Screen when Iam trying to add a document its giving an error by saying Account Currency is not matching with document currency.
    (Item is an Excisable Item and Currency is BP Currency)
    Pls let me know the reason.
    Thanks&Regards,
    Chakrapani Bandaru
    9849290882

    Hello chakrapani bandaru,
    Please set all the G/L accounts involved in the transactions to Multicurrency accounts (e.g. BP, revenue tax accounts etc.)
    It means BP account, revenue and tax account
    as well, even if there is 0% tax.
    Please check Administration/System Initialisation/Company Details/ Basic Initialisation/Default Account Currency and make sure it is set toMulti Currency.
    The exchange rate difference account should also be set to multi currency.
    hope it helps.
    Wilm Wang
    SAP Business One Forums Team

  • The number of details is not matching with the total count.

    Hi all, again stuck with the code.
    There is a form where i have to populate all the details of few tables in excel & there is a report where i have to make count of all these details.
    The problem here is the number of details that is populated in excel is not matching with the count in report, both have to match. There some problem in code, please help me in matching it.
    The below is the 5 tables with the columns below.
    Tables are ENQACEDTL, ENQACEHDR, ENQACMDTL, ENQACMHDR, ENQACSPEC:
    The Names mentioned below the table's name are Column Names:
    ENQACEDTL
    ENQACEHDR
    ENQACMDTL
    ENQACMHDR
    ENQACSPEC
    ENQNO
    ENQNO
    ENQNO
    ENQNO
    ENQNO
    ENQAMDNO
    ENQAMDNO
    ENQAMDNO
    ENQAMDNO
    ENQAMDNO
    ENGREF
    ENGREF
    QTY
    OFFREF
    MINSL
    ITEM
    EPREPBY
    ITEM
    BRANCH
    EINSL
    FRAME
    DEPT
    RATING
    DEPT
    MTEMP
    TECOLD
    ENGREFTDT
    ENCLIP
    MKTREF
    ETEMP
    THE BELOW IS THE SELECT STATEMENT CODE FOR POPULATING DATA IN EXCEL:
    SELECT ENQACEDTL.ENQNO, ENQACEDTL.ENQAMDNO, ......... (....ALL COLUMNS)
    FROM ENQACMHDR,ENQACMDTL,ENQACEHDR,ENQACEDTL,ENQACSPEC
      WHERE
      ENQACMHDR.ENQNO=ENQACMDTL.ENQNO  AND
      ENQACMHDR.ENQNO=ENQACSPEC.ENQNO  AND
      ENQACMHDR.ENQAMDNO=ENQACSPEC.ENQAMDNO AND
      ENQACEHDR.ENQNO=ENQACSPEC.ENQNO  AND
      ENQACEHDR.ENQAMDNO=ENQACSPEC.ENQAMDNO AND
      ENQACMHDR.ENQAMDNO=ENQACMDTL.ENQAMDNO AND
      ENQACMHDR.ENQNO=ENQACEHDR.ENQNO  AND
      ENQACMHDR.ENQAMDNO=ENQACEHDR.ENQAMDNO AND
      ENQACEHDR.ENGREF=ENQACEDTL.ENGREF AND
      ENQACMDTL.ITEM=ENQACEDTL.ITEM AND
      ENQACMHDR.DEPT=:PROC_DEPT AND
      ENQACEHDR.ENGREFDT BETWEEN :FROMDATE AND :TODATE
      ORDER BY ENQACMHDR.ENQNO,ENQACMHDR.ENQAMDNO;
    THE BELOW IS THE SELECT STATEMENT CODE FOR COUNT OF DETAILS IN REPORT:
    SELECT ALL  ACENQ.ENQACEHDR.DEPT, COUNT(ACENQ.ENQACEHDR.ENQNO) COUNT
    FROM ACENQ.ENQACEDTL, ACENQ.ENQACEHDR
    WHERE (ACENQ.ENQACEDTL.ENGREF=ACENQ.ENQACEHDR.ENGREF)
    AND ENQACEHDR.LOCKE=1 AND
    ENQACEHDR.ENGREFDT BETWEEN  :P_STDATE  AND :P_ENDDATE
    GROUP BY ENQACEHDR.DEPT;
    There is problem in join condition of 1st code that is in the "SELECT STATEMENT CODE FOR POPULATING DATA IN EXCEL":
    Please help me to sort out this problem..
    Thank You.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    Oracle Forms & Reports Builder 6i.

    As Karthick points out, we cannot help if we cannot see your correct table structures (create table statements) and some example data and expected output (insert statements would be helpful).  You're telling us there's a problem, but we cannot see what the problem is as you've not shown it.  Just saying your query is not working is like me telling you my car is not working, but not telling you what the symptoms are.  You wouldn't know where to start in fixing it.
    Why are you using Oracle 9.2.0.1 ?  Not only has that version been unsupported for about a decade, but 9.2.0.7 was the first version of 9i that was considered 'stable' as versions prior to that were considered buggy.  So you're using an old, unsupported and buggy version of oracle.  Seriously, you need to consider upgrading to a supported version, preferably at least the latest 11g version.
    And what has oracle Forms and Reports got to do with the issue?
    And please explain how you are getting your data out of Excel and presenting it to Oracle to be able to query against it.  Excel does not have "tables", so your question is completely unclear how you are querying the data from Excel.

  • Need to reset Airport Extreme password, but the instructions provided by Apple and the support community do not match with what I get in my computer.

    I have followed the directions given on the Apple support pages and the ones provided in this community, but they do not match with what I get from the Airport Utility. According to the dorections, after starting a soft restart on the Airport Extreme, I should select the network from the menu bar item (which I suppose is the symbol for wi fi). Then it says to open the Airport Utility and select the Airport Base Station, ok up to now. But the instructions say that after selecting the base station to "click Continue". In my Airport Utility, which is the latest version, there is no Contimue. When I select the Base Station I get a bubble with information on the base and an "Edit" button. By clicking on this button, I am able to get a new window with info on the Base, inlcuding password, but I never get the window which says that the device has been reset. I need help, as I have bought a second Apple computer and need the password to set the wifi preferences, and I forgot the password for the Airport Extreme.

    You're doing everything right. The problem is that the Apple Knowledge Base article is outdated and the screenshots do not correspond to the new version of AirPort Utility.
    If all you need to do is find the password for the Extreme, you can do that by following this procedure. Use the Mac that is already configured to connect to your Extreme's network.
    You can retrieve your existing wireless network password from a Mac you normally use on that network. Your wireless network password is stored in your Mac's Keychain.
    You must first have an Administrator account on a Mac that you use with that AirPort Base Station, one that is used to connect to your AirPort network.
    On that Mac, open the Utilities folder. Find Keychain Access and launch it.
    In the search field at the upper right, type Airport. All the Keychain entries for your base station will appear there, as well as other entries.
    Look at the column "Kind". The entry you want to select will be labeled "AirPort network password" (not "AirPort base station password" or anything else).
    If you are trying to recover the AirPort Base Station password then the entry you want to select will be labeled "AirPort base station password" not "AirPort network password".
    Double-click that, and in the window that appears check the box for "Show password".
    You will get the following window:
    In the Password field type your Mac's Administrator password - the same one you used to log in to that Mac.
    Then, click Allow, and your wireless network password will appear in the "Show password" field:
    Make note of it.
    Close the window, then quit Keychain Access.

  • ACE HTTP Probe with regex

    ACE HTTP Probe with regex
    Hi,
    I'm trying to setup a HTTP probe with expected string rather then a code (config below). I do a GET for the page then a search for a string in the response however it's not working, as probe appears as failed.
    I've tested the connection to the server by using telneting and then looking at the page displayed to make sure the string I want to match is in the response.
    probe http HTTP-PROBE
    port 43050
    interval 30
    passdetect interval 30
    passdetect count 1
    request method get url /action=help
    open 43050
    expect regex action=help
    Q. Is there anything wrong with this configuration and what I'm trying to achive?
    Thanks,
    Pritesh

    Use "expect status" under probe config. expect regex doesnt work if expect status is not configured.
    expect regex work flawlessly with static pages. It doesnt work all the time with dynamic pages.
    Specially if "content-length" header is missing from Server response.
    Hope it helps
    Syed Iftekhar Ahmed

  • Line Order No doesnt match with Invoice line number

    At the line level , the line order no doesnt match with the invocie line number
    ie. say for example in a sales order we have 3 lines
    1. A
    2. B
    3. C
    where as in transaction at AR level the line no is different
    1. B
    2. A
    3. C
    the customer wants in AR also the line no should be same as sales order line nos
    Please help us what is the setup where we define the line level numbering in AR.
    I have checked the line ordering rules but i am not clearly understanding, if anyone can explain with an example how this no generates witht he setup details it would be great

    This can be done in XSL OR in procedure on the DB side. Performance wise better to do in procedure as mentioned by other use. You can choose to go with DB or XSL approach depending on number of orders you are expecting in a single message. If it is going to be 100s or few thousand messages then keeping it in XSL is not a problem. But if you are planning tens or hundreds of thousands of orders in the same request then better do it in stored procedure.
    How do you do in XSL?
    1. Put a for each on every unique order no. You can use xsl:Key or xslt:distinct-values() for this.
    2. Within for each unique value of order no, use position() function to pass line/order no as 1,2,3... etc. As soon as the loop moves to second iteration for the next unique order no, count will automatically start again from 1,2,3... and so on.
    Apart from slightly slower processing time, another drawback from this approach is that the data in the XML you send to DB procedure will be sorted by order numbers. All orders with same number will appear together.
    Another problem with this approach is that this will work only within one request, i.e. if the next request contains an order with same no which was already sent in a previous request, for this order the count will again start from 1. So if you want to keep the sequencing maintained across multiple requests, the easiest way to do is in the DB procedure where you can lookup in the table before inserting a new row and insert with next sequence of that order no.

  • Investment order reporting does not match with AM

    Hello,
    We are exectuing two reports 1) internal order report( for investment order) and asset history sheet.
    Both the report figures should match. but due to some reason the internal order report shows less value than asset history sheet.
    What can be the possible reason for the differences.
    BR,
    Zulfikar

    Hi
    Check whether the sales order creation date and actually when you created the delivery ? if say u created the sales order yesterday with yesterday date as delivery date and carried out delivery process to day means. The delivery date in the delivery process will be today date in that case delivery date wont match with sales order. This is one case like that so many cases are there.
    Material might not be confirmed etc....
    Regards,
    Mullai

Maybe you are looking for

  • Automatic Message Processor Assignment In Service Desk Message

    Dear Expert, We have configured Service Desk as per the web log in the following link [/people/bruyneel.guillaume/blog/2008/05/02/service-desk-implementation-guide-part-i|/people/bruyneel.guillaume/blog/2008/05/02/service-desk-implementation-guide-pa

  • LSMW-BAPI Method sales contract creation

    Hi, I have a requirement to create sales contract through batch input or bapi method or idoc . Please let me know if there are any existing applicable methods for it. with regards, Bharath

  • RFC authorizations.

    Situation: After replacing old roles on my system that had auth obj. S_RFC with following values [ACTVT = 16; RFC_NAME = *; RFC_TYPE = FUGR;] in most of them, my system is plagued by RFC_NO_AUTHORITY short-dumps. I'm yet to see any transaction that h

  • External HD connected through network cable

    Ok, I am a brand new mac user and am extremely confused. I have an external HD that connects through a cat5 cable. There is a plug in the drive for usb, but its the same jack as the computer so I guess I cannot connect it that way. It's a couple year

  • Pages is incredibly slow.

    Pages is incredibly slow.  Everytime I click or type the pinwheel appears.  How can I fix this?  I have a document with some pictures on it, but I can't even move the image a few degrees without the pinwheel appearing.