Problem with find/change GREP

Hi, try to run by default find/replace InDesign AppleScript script to solve many formatting problems in a large document. One of them is occurences of a two-digit dollar figure followed by a comma (eg. "$ 10") that needs to be changed to have no comma.

Use GREP I can pick it up by searching for "\$\d\d", but when I replace it with '\$\d\d' I get the string "\$\d\d". IE. "$ 10" becomes "\$\d\d" instead of "$ 10." I'm misunderstanding how works the part 'change' grep? Can someone advise?

FYI the line in the search/replace support .txt doc is:

grep{find what: "-\\d\\d$,"}{change to: "\\$\\d\\d"}{include notes: true, include master pages: true include hidden layers: true, any word: false}Remove commas after the price.

.. What includes the extra backslashes to escape the backslash which are part of the GREP expression.

Any help much appreciated!

Thank you.

On Grep Pallette, use below syntax to find two or more digit dollar figure followed by a text of commas,

Search: (\$\d+),

Change of: $1

Vandy

Tags: InDesign

Similar Questions

  • Strange problem with find/replace

    I'll have a little strange problem with find/change in InDesign CS4 Mac.

    The document is a data merge.  In the worksheet, there are two fields that contain either a '@' or a '&', depending on the context.  These are just placeholders - the plan was to convert glyphs of the police 'Wingdings 2' after creating the merged document.  We do it this way because we couldn't figure out how to get the glyphs themselves in the .csv file.  Two glyphs are < FO54 > and < FO56 >.

    First I used find/replace to change all the '@' symbols to < FO54 >.  That has worked well. But then when I tried to change the symbols "&" < FO56 >, I got the < FO54 > again instead.  In fact, now I ask what glyph, I get < FO54 >.  Find/replace always normally works for normal text... it of just that he seems to have decided that if I ask a glyph, I get < FO54 >, anything.

    I tried to shut down and restart, but the bug is still there.

    Any thoughts?

    I used the tabs of glyphs in find/replace when I tested it, but what you describe seems to work as well.

  • Find/change Grep can't find one instance per paragraph, where wrong me?

    Hello

    I use a find/change Grep to find any price with a comma and change this comma to a thin space (the newspaper style).

    But the Grep considers only the first instance of this paragraph.

    Example of text...

    "$200 $200 000 000 $200,000."

    text at the beginning of paragraph $200,000

    $200,000 at the end of the paragraph text

    $200,000 tab. »

    In the sample, the grep would miss the second and third prize on the first line.

    I use...

    Find...

    (?<=\$) (\d{3})\,? ({\d{3})

    also tried (\$\d{3})\,? ({\d{3})

    Set up...

    $1 ~ <$ 2

    Is there anything I can add to find these last two prices?

    I use this in combination with script Batch find replace, so different greps are set up for 5, 6 and 7 digits starting by $.

    Thank you.

    Try this,

    (?<>

  • Problem with finding the SmartGlass an Xbox to Store or App Store

    Original title: xbox a smartglass

    I can't find that the smartglass an Xbox on the windows store or the appstore please help

    Hi Ibrahim.

    Please contact Microsoft Community. I understand that you have a problem with finding the SmartGlass an Xbox to Store or App Store. I will surely you help with this.

    You can download Xbox a SmartGlass from the following Windows store link.

    http://apps.Microsoft.com/Windows/en-us/app/Xbox-one-SmartGlass/c3a46cb8-e733-4579-B716-862e123fa831

    For more information you can check the link.

    http://support.Xbox.com/en-us/Xbox-360/apps/SmartGlass-Info

    Hope this information helps. If you need more assistance or information on this question, reply to this message. I'll be happy to help you.

  • counting in a find change grep

    I have a script that runs several find change greps and alert how many each grep search were made.

    This is the code:

    See section function () {}

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = "the (section\\s +?). \\d+ ? [ \\.\\d+]?)";

    var changed = app.changeGrepPreferences.changeTo = "$1";

    Reference of the changed.appliedCharacterStyle = "cross";

    var changes1 = app.activeDocument.changeGrep ();

    If {(changes1.length = 1)

    Alert (changes1.length + "instance of 'the section' became 'article'.");

    } else {}

    Alert (changes1.length + "instances of 'the section' changed to 'section'.");

    }

    };

    No matter how many changes I know she took it returns 1.

    It also does not apply the character style to the entire reference. The character style is supposed to underline the Word section \d.

    He pointed out only half of the section of Word:

    section5

    Do not know what is happening.

    (1) make sure of course, you have the same name "cross references".

    (2) when checking a condition use double ==

    If (changes1.length == 1) {and NOT so {(changes1.length = 1)

  • Problem with the change in value of listbox event

    Hello

    I have a problem with the help of Listbox value change event. The code that I have attached is a simplified version of the largest program, but the problem is the same. One of the loops of Nonna is responsible for handlig occurring events ant the other is responsible for the execution of the program. In the project of oryginal I use a listbox control to determine which plots graphic display of a waveform is visible (first position of the listbox-> only plot first visible etc.). In the attached vi, I just show the current value of the listbox control. The problem is the event runs only once and then the program crashes. I want to be able to change the value of the listbox work both at idle and in State of a program, but when I put the structure of the event in both States, he does not. I'd be very grateful if someone smarter than me could tell me where I made my mistake. I want my program to be able to manage the keys and listbox events in States (slow down and knit) program.

    You have two structures of event in two cases different from the structure of the case, and both are tuned to listbox events has changed. Because only once can be triggered at any time, the VI crashes (lock events the front panel (default) until the event can complement).

    You must use a unique event structure managing all events.

    The overall program architecture looks like inside-out for me.

    For the buttosn, you must use action lock (switch not release!) and use the value changed events.

  • Problem with the change of payment details

    Hello

    I tried many times to update my credit card payment information, but I can't change the 'old'.

    I still got the message "there is a problem with the information of card entered here. Please enter another card or contact your bank. »

    The card is newly issued and is on the name of my company. I paid her for other accounts online without a hitch, then there is no problem on my side.

    I use a Mac and Google Chrome.

    Is it possible for me to provide details by e-mail and make the change?

    I await your response and thank you in advance,

    Cristina

    This is an open forum, not Adobe support... Click below to contact Adobe staff for help

    While the forums are open 24/7 you can't contact Adobe support at any time

    Chat support: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • PROBLEM WITH NAME CHANGE RECORDS

    I have Vista and when I try to rename a folder, it will not work and returns just to "New folder" or what ever the original title was.

    This just started to happen.

    David H

    I offered a suggestion from someone who has problems with the sidebar AFTER installing 3 updates of Windows.
    The topic is "sidebar", but the principle and procedures are the same. Have a look at. See if you care to try the suggestion:
    http://social.answers.Microsoft.com/forums/en-us/vistaappearance/thread/b6de454b-26a7-4753-B9BE-347904fbe25d For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • I have a problem with finding a PnP USB audio device when you search for available audio devices.

    Hello.

    I am building an application that can find a PnP USB audio device and play a tone if the device is connected. I am able to search audio devices using "Sound Device Info.vi" of the lvsound2.llb that comes with labview.

    The vi can find the USB device in good conditions, but there are problems - I'll try to describe 2 scenarios.

    1. the USB device is connected before 'Sound Device Info.vi' is called for the first time.

    In this case, the program can find the USB device. If I unplug it, the device disappears from the list of found audio devices. If I reconnect to the same USB port, it reappears in the list. It's all good.

    If I reconnect it however a new USB port, the device is not found. This is not good.

    2. the USB devices is not connected when 'Sound Device Info.vi' is called for the first time.

    "Sound Device Info.vi" is not able to find the device. Disconnect and reconnect does not make a difference.

    I'm under labview 2012 on windows 7.

    I am running the application as an exe to build.

    I call 'Sound Device Info.vi' as a 'call for reference"and the reference is closed between calls to the vi. I was hoping this would unload the dll used in "Sound Device Info.vi" and would solve the problem, but it didn't.

    Is there a way to reset the information usb labview during execution?

    Concerning

    Stephan.

    Hey Stephan.

    The sounds screws require a DLL located in:

    C:\Program Files (x 86) \National Instruments\LabVIEW 2012\resource\lvsound2.dll

    Internally, LabVIEW uses the DirectX API to enumerate devices. The one caveat is that probe us for devices when loading the DLL. We probe not later. So that it works for Bluetooth, USB, fire wire, etc. devices that can be inserted or removed at any time, you control somehow when this DLL charge and discharge. To do this, please see the following document:

    Dynamically that I can load and unload a DLL in LabVIEW?

    http://digital.NI.com/public.nsf/allkb/77594203D78D12278625729100758BE5

    I would also recommend that you provide a Kudo to this idea:

    Updated library lvsound2 (Sound Input/output Sound live) to support audio devices change on the fly

    http://forums.NI.com/T5/LabVIEW-idea-Exchange/update-the-lvsound2-library-sound-input-sound-output-V...

  • Find format preferences in a script of find/change GREP?

    Hi all

    I create my first script to search/replace to run GREP queries several at once. But I am struggling to find how to specify the Format to find: preferably in the script that can be in the usual find/replace dialog box.

    Here is an example of a line in my script. What I want to achieve is for the line search for words/characters who currently have [standard paragraph] applied and then change the format of a paragraph style particular, I called "team name"...

    grep {findWhat: "(.+) ', appliedParagraphStyle: '[standard paragraph]'"} {changeTo: '$1', appliedParagraphStyle: 'The team name'} {} / / apply style name team

    BTW, I use the standard FindChangeByList script that comes with Indesign. Any help/comments are appreciated.

    See you soon,.

    Marco

    Instead of the name of the style, try the object of paragraph style:

    grep {findWhat: "(.+)", .paragraphStyles appliedParagraphStyle:app.documents [0] [1] ""} {changeTo: '$1', appliedParagraphStyle: 'new style'} {}

    Peter

  • Problem with find/replace

    Hi, I'm doing a search/replace which is the first space after the text which is tagged with a specific character, called name, style and change to an en space. Thus, for example, if I had the text:

    Cowboy buckeroo or vaquero

    Cowboy has the grade name, pigsty. applied and I would like to change space between cowboy and buckeroo an en space, but let them spaces on each side where stay as they are.

    I can't understand how someone anyone help?

    Thank you

    Looking a GREP

    To find

    (.+)

    Implement

    $1 ~ >

    Find the Format:

    Do a search for

    ~>\s

    Replace:

    ~>

  • Problem with the change of location of the folder on the desktop (Windows 7)

    Hi all, I have windows 7 Home Premium and changed my location on the desktop of \desktop c:\users\ (user) on my drive d: since my c: drive was getting full (for that I click with the right button on the back of my office and I changed my location).  However, the system has simply dumped all my files and Office files in the root directory d:\, without creating a new folder on the desktop, which is what I thought was going to happen.

    To resolve this problem, I want to transfer all my files + folders office to a dedicated folder d:\desktop but found I can't since now there is now no desktop as folder! (catch-22).  I entered the \links c:\users\ (user) file and changed the objective of the Office in d:\desktop instead of d:\, but it has no effect! My office target is always the root directory. How can I change this?  I hope you can help!  David

    Go to libraries, do a right click on desktop, cut, and then paste it on the other drive. The wonders of windows 7 will automatically record anything he puts on the desktop for now :)

  • Problem with Find is close to missing Photos

    First of all, I saw the post where the OP posted that he renamed photos and then the ability to find nearby missing Photos wasn't working.

    I had the photos that were on a network drive and I copied pictures on a disc hard so that I can work faster.  After all my changes, I've deleted the local copy of the raw files.  I thought I could just click on the '!' icon on a single photo, and a link back to the raw file that is on my network drive.

    The problem that I am running is only the picture that I chose is related even though the ability to find nearby missing Photos is on.  I've not renamed my raw sort files.  Right now, I'm linking each file one at a time and I have to go through 130 raw files.  I just wanted to check here to see if there is another solution.

    If all goes well, I'll get one before finishing through each file one by one

    Thank you

    Ron

    You can reconnect entire folders by right-clicking on the folder and selecting "Update folder location"

    However, you create your own problems here, which can easily be avoided. Editing in Lightroom is NOT faster when the photo is saved to a local drive. You will find that there is no difference noticeable photo editing on a network rather than the pictures on a local disk. So the solution in the future is simple... let the pictures on the network drive.

  • Hello! I have a problem with the change of the method of payment. PMT_000008 error, when I'm trying to change the method of payment. Help, please!

    PMT_000008 error, when I'm trying to change the method of payment. Help, please! Cookies are cleaned, tried different browsers. It does not help.

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Problem with the change of a 'State' the substitution of one break of the chronology of the objects

    Here is my setup: I have a single slide for learning select 9 melodies 'text buttons' to view 9 different definitions.  To do this, I set myself to each buttons to change the "State" of the original image for the introduction of a 'legend of text' containing the definition of that label of buttons.  I also three navigation buttons (output, back and next; button_19 _20 & _21) with breaks built into the end of the timeline. coinciding with the end of the audio narration for this slide.

    Here's my problem: the calendar runs and stops as it should until the learner chooses one of the 'text' buttons after that the timeline is suspended; how it seems to send a command to "continue" and substitutes at the break, and brings the learner to the next slide.

    This has something to do with the function "States"?  I used to do exactly the same thing in Cap 7 with stocks advanced without any problem.

    Thanks in advance for the help.

    v/r

    Jay

    stateTimeline.JPG

    If it's 9 Captivate, locate the box continue a project of play in the Actions section and deselect buttons for each.

Maybe you are looking for