GREP code for changing $150.00 to $150.  ?

I am trying to save space in a multi-column catalog.  Many prices are whole dollar amounts.  What would be the GREP code for finding and replacing?

Eugene,
Your GREP seems to work but it's over-enthusiastic: it finds any two-digit number preceded by a dot, so also "23.00%" and "4.20 am". The reason is that you thought that [\$\d+] would match "a string consisting of $ and/or digits", but you'd need [\$\d]+ for that. But that doesn't work in the GREP expression (?<=[\$\d]+\.)\d\d because the possible matches in a lookbehind must be the same length. Your [\$\d+] is a strange beast which, though it's wrong, made it seem as if the expression worked. Strange coincidence!
Since matches in lookbehinds must be the same length you cannot use *, +, and ? in them. Instead, you need to enumerate the patterns, something like this:
   (?<=\$\d\.) |
   (?<=\$\d\d\.) |
   (?<=\$\d\d\d\.)
00
(Without the spacing and the returns, naturally.)

Similar Messages

  • T-Code for changing the default Exchange Rate reference for creating PO?

    Dear All,
           Can somebody kindly give me the T-Code for changing the default
    Exchange Rate reference for creating PO? Is there a Step by Step
    procedure before changing the default exchange rate?
    Thank you in advance.
    Regards,
    Gopesh

    Hi
    There is not such Tcode to change the default exchange rate from the PO.
    If you want you can confugure the exchange rate in the following path in the IMG,
    SPRO>MM>LIV>Incoming Invoice>Configure How Exchange Rate Differences Are Treated
    Hope it helps you.
    Cheers
    Umakanth

  • Code for changing a TextField BackGround color?

    Hello again!
    I can´t find anywhere the code for changing the background color of a TextField, anyone knows?
    I tried:
         TextField.border.fill.color.value = "255,255,255";      // doesn´t change bg color
         TextField.caption.font.fill.color.value = "255,255,255";     // doesn´t change bg color
         TextField.value.rectangle.fill.color.value = "153,153,153";      // doesn´t change bg color
    Bur none of them works!

    The script works fine..please show here..
    https://workspaces.acrobat.com/?d=EKbH6jmrJ-5RXnVNyxPiPA
    Kind regards,
    Mandy

  • Possible t-codes for changing schedule line dates

    Hi
       I am trying to find out all possible t-codes for changing schedule dates in sales order. I found out of the following t-codes:
    VA02
    CO06
    V_RA
    V_V2
    Experts please tell if I'm missing any t-code
    TIA

    Hi,
    As far as my knowledge goes, you have got all the tcode. if you get more tcode send me a mail.
    Thanking you
    Regards
    Manoj
    ([email protected])

  • T.code for change company email address

    Hi experts,
    How can i change email address of billling invoices of XXXX company code.
    old: [email protected]
    new : [email protected]
    Any T.code for change email address of particular company code.
    Thanks in advance for answer.

    Hi,
    if I correctly understand your Q- a company code is your customer.
    In general data of the customer master record there is an option to enter the e mail address of the Customer.
    Regards
    A

  • GREP code for find/change

    Hi everyone,
    I have a list of about 500 entries, with each entry being formatted as follows:
    Firstname [tab] Lastname [tab] State [tab] Level
    I need to perform a find/change operation using some GREP code that will target the tab between the first and last name and replace it with a space. Then I need to target the tab between the last name and the state and replace it with a comma and a space. Then finally I need to target the tab between the state and level and also replace it with a comma and space.
    I wondered if someone could tell me what the code would be for this type of operation?
    Appreciate any assistance.

    You can also do it in a single search:
    Find
    (.+?)\t(.+?)\t(.+?)\t
    Replace
    $1 $2, $3,
    (there's a space after the $3,)

  • T Code for Changing material price

    Hi friends,
    Can anybody tell me what is the T-Code for
    1. To change th material price
    2. Transfer posting from Un-restricted stock to block stock
    3. Transfer posting from Un-restricted stock to Quality stock

    Steve,
    I have a requirement
    Daily cycle counts are completed on inventory. SAP prints nightly a count cycle of 50 inventory items to count (Inventory Audit). This is done so our warehouse folks count items throughout the year rather than at the end of the year all at once. Every January 1 of each year the cycle count begins until we finish cycling through the inventory, which usually happens around October.
    When suspend the inventory counts it places the inventory cycle counts on hold for a period of time. The cycling that would usually happen in October of each year is extended out by the days the inventory counts were placed on hold. This is to allow for 100% inventory audit counts. As I understand SAP puts those inventory counts on hold and begins again when it is restarted.
    I will need the TCODE to stop and start the inventory cycle count…
    Can you please help me out

  • Need Javascript code for changing text field color

    Looking for a Javascript code to change the textfield background color and edge color in acrobat?  (without any xfa reference)

    The background color is the fillColor field property: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.705.html
    and the edge color is the strokeColor property: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.723.html

  • T-code for changing valid to date

    hi
    is there any t-code other than MP01 to change Valid to date for MPNs?
    Regards
    Smitha

    Hi,
    I dont think , we can do it from other transaction code.
    MP01                   Maintain AMPL Records             
    MP02                   Display AMPL Records              
    MPAD                   Delete archived materials from AMPL
    Thanks,
    Naveen Inuganti

  • Edit code for change drive letters in paths for links, to also work with Fonts that have been moved.

    I have the following code that looks through my links and changes all of the drive letters to the new locations where they exist.  So if something stays in the same folder structure, but moves to a new drive E: and InDesign can not longer find it, you can run the code and have it fix them all.
    Well I want to do the same but for fonts that have also moved.
    Thank you in advance for any and all help!
    if (app.documents.length == 0) {
        err("No open document. Please open a document and try again.", true);
    if (File.fs != "Windows") {
        err("This script is for Windows only.");
    var myDoc = app.activeDocument;
    var myLinks = myDoc.links;
    var myCounter = 0;
    if (myLinks.length == 0) {
        err("This document doesn't contain any links.", true);
    var mySettings = CreateDialog();
    for (i = myLinks.length-1; i >= 0 ; i--) {
        var myLink = myLinks[i];
        if ( myLink.status == LinkStatus.LINK_MISSING || (myLink.status != LinkStatus.LINK_MISSING && mySettings[2] == false) ) {
            var myOldPath = myLink.filePath;
            var myNewPath = myOldPath.replace(mySettings[0] + ":\\", mySettings[1] + ":\\");
            var myNewFile = new File(myNewPath);
            if (myNewFile.exists) {
                myLink.relink(myNewFile);
                try {
                    myLink.update();
                catch(e) {}
                myCounter++;
    if (myCounter == 1) {
        alert("One file has been relinked.", "Finished");
    else if  (myCounter > 1) {
        alert(myCounter + " files have been relinked.", "Finished");
    else {
        alert("Nothing has been relinked.", "Finished");
    function err(e, icon){
        alert(e, "Change drive letter in path", icon);
        exit();
    function CreateDialog() {
        var myDrives = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "y", "Z"];
        var myDialog = new Window("dialog", "Change drive letter in path");
        var myPanel = myDialog.add("panel", undefined, "");
        myPanel.orientation = "column";
        myPanel.alignChildren = "left";
        var myGroup = myPanel.add("group");
        myGroup.orientation = "row";
        var myStText1 = myGroup.add("statictext", undefined, "Change ");
        var myDropDownList1 = myGroup.add("dropdownlist", undefined, myDrives);
        if (app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl1") != "") {
            myDropDownList1.selection = myDropDownList1.items[app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl1")];
        else {
            myDropDownList1.selection = myDropDownList1.items[2];
        var myStText2 = myGroup.add("statictext", undefined, " to ");
        var myDropDownList2 = myGroup.add("dropdownlist", undefined, myDrives);
        if (app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl2") != "") {
            myDropDownList2.selection = myDropDownList2.items[app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl2")];
        else {
            myDropDownList2.selection = myDropDownList2.items[3];
        var myCheckBox = myPanel.add("checkbox", undefined, "relink only missing links");
        if (app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_checkbox") != "") {
            myCheckBox.value = eval(app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_checkbox"));
        else {
            myCheckBox.value = true;
        var myButtonsGrp = myDialog.add("group");
        var myOkBtn = myButtonsGrp.add("button", undefined, "Ok", {name:"ok"});
        var myCancelBtn = myButtonsGrp.add("button", undefined, "Cancel", {name:"cancel"});
        myOkBtn.onClick = function() {
            if (myDropDownList1.selection.index == myDropDownList2.selection.index) {
                alert("Both drive letters should not be the same.", "Change drive letter in path");
            else {
                myDialog.close(1);
        var myDialogResult = myDialog.show();
        if (myDialogResult == 1) {
            app.insertLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl1", myDropDownList1.selection + "");
            app.insertLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl2", myDropDownList2.selection + "");
            app.insertLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_checkbox", myCheckBox.value + "");
            return [ myDropDownList1.selection.text, myDropDownList2.selection.text, myCheckBox.value ];
        else {
            exit();

    ok, so I have discovered where the issue came from...
    The code you helped me with before, were I removed all links and my link character styles that I had (found here: http://forums.adobe.com/message/5881440#5881440)
    Well it set all the items I was finding/replacing to unknown fonts that my machine doesn't have (Like Helvetic Neue Bold, instead of just Helvetica Bold, etc).
    Is there an easy way of fixing this?
    The only way I know to fix it right now is:
    Go to Package >> go to Fonts >> Select the the font that says it's missing >> Select Find First >> CLOSE ALL OF THIS, then use the eye-dropper to select the text around that font which copies the formatting and then apply it to the text who's formatting got messed up.  And then start the process all over again for the next occurence of that word whose formatting got stripped.

  • Using GREP styles for changing characters and colors

    Hello everybody,
    I have a question regarding GREP styles. I wish to change each letter of an alphabet in text to a square in a different color. For example: every 'a' in the text change to a yellow ■. I thought GREP styles would be perfect for it so I went to find/change, typed in my requests and InDesign told me it has found no 'a' in my text, which isn't possible. How do I fix it? And the other thing- is it possible to change the color of ■ ? Because i couldn't find the option.
    Please excuse me my incompetence, I am a new user of InDesign.
    Thanks in advance for your help! : )

    First off, it sounds like you want to use find/change with GREP, which is fine, rather than a GREP style, which is part of a paragraph style definition and cannot change the text in any way other than apply a character style to the found string, so would not help here.
    The not finding the text makes me think you've limited the search parameters in some way, either by limiting the scope to a selection, or by including a style or format requirement in the find options, perhaps.
    In order to do this, I think you are going to need to make use of the "other" category in the change dropdown and select Formatted Contents of Clipboard (which should clue you in that you need to make one of your colored squares and copy it to the clipboard before you run Find/Change). You can do this with either a plain text query or a GREP query, and there is no advantage to GREP in this case unless you want to match several different things and apply the same clipboard content to any of them.
    You'll need to run a separate find/change for each colored square. It might be possible to script a chain so it runs in a single operation, but that would also require swapping the colored sqaures on the clipboard which complicates things in this case. You might want to ask over in scripting: InDesign Scripting

  • Transaction code for change in cost of BOM component

    Hi Gurus,
    If BOM or any source materials has been updated in the system, the header material need to be re-costed. Is there any existing T-code to get the list of the materials , the changed might impact to.
    Regards
    Kaisar

    Dear Kaisar,
    There is no standard T code to meet this requirement wherein you get all the required details.
    Only you have to identify and cost it using CK11N/CK40N.
    If you are ECM - change numbers,you can identify the made changes by a customized report and then
    you recost those materials alone.
    Again its a very big customized development.
    check and revert back.
    Regards
    Mangalraj.S

  • SDK sample code for Changing name of Exported file thru Webi schedule

    Hi experts,
    I am wanting to know if someone has got any sample Java SDK code which I can use to login to FTP and rename the pdf files generated from webi schedule script and append customised date format towards the end.

    Hi Prabhat,
    For online samples
    https://www.sdn.sap.com/irj/boc/samples
    For detalied descripation on BO SDK.
    https://www.sdn.sap.com/irj/boc/sdklibrary
    For BOE SDK guide.
    http://help.sap.com/businessobject/product_guides/boexir31/en/boesdk_java_dg_12_en.zip
    This would give you complete information on scheduling.
    For RE SDK guide.
    http://help.sap.com/businessobject/product_guides/boexir31/en/resdk_java_dg_12_en.zip
    This would give you information on how deal with Desktop intelligence report and Web intelligence report.

  • Psuedo code for changing a variable when my score is a multiple of 5?

    I have a game where I need to increase the difficulty when the score is a multiple of 5, does anyone think they could provide me with some psuedo code that would help me out with this?
    I have tried quite a few things and it hasn't worked out perfeclty thus far.

    If you want to see if something is a mutliple of 5 use the modulus operator: %    The modulus returns the remainder after dividing one number by another
         if(score % 5 == 0){
              // the score is a multiple of 5

  • GREP query for find/change operation

    Hi everyone,
    In the following line, there's a comma after the first name. This type of formatting is repeated hundreds of times on a number of pages so I need to use a GREP find/change query to remove the comma after the first name and replace it with a space.
    Firstname,Lastname,State
    I wondered if something could tell me what the GREP code would be?
    Appreciate any assistance.

    function(){return A.apply(null,[this].concat($A(arguments)))}
    ..  it's also doing it for the second comma
    That's impossible. You must have entered something else than Scott's code.

Maybe you are looking for