change the numbers by comma-dot and vice versa

Hello

I have this script that changes the format of the European numbers to the United Kingdom / U.S. (for example 1,000 to 1,000) and does not apply to numbers preceded by any letter.

for now it is partially works very well, changing only those digits preceded by the letters without the space between them. for example: machine type TSK4.500 in TSK4, 500 will not be changed and that the OK.

I need to recognize and does not also change those prefixed numbers of letters with a space:

TSK 4,500 must not be activated.

So I need in a few words, this script to work only with numbers by avoiding those who might be part of a name, etc..

can someone help me please?

Thank you very much

CINZIA

try {main ()}

catch (_) {alert ("could not execute.")}

int main() {}

Function FindItems () {}

If (app.selection.length == 0) {return app.activeDocument.findGrep () ;}

If (app.selection [0] .hasOwnProperty (of"base")) {return app.selection [0] .findGrep () ;}}

If (app.selection [0] instanceof TextFrame) {return app.selection [0].parentStory.findGrep () ;}}

exit ();

} / / FindItems

BEGIN main

app.findGrepPreferences = app.changeGrepPreferences = null;

app.findGrepPreferences.findWhat = "\\d+[,.\\d]+\\d+";

app.findGrepPreferences.findWhat = "[?]". \\l\\u]+\\d+[,.\\d] » ;

app.findGrepPreferences.findWhat = "[!]. [ \\l\\u]] +\\d+[,.\\d]";

app.findGrepPreferences.findWhat = "\\d+[,.\\d"];

var Found = FindItems ();

var Temp;

for (var i = Found.length - 1; i > = 0; i--)

{

Temp [i] = trouve.contents.replace (/, / g, ' # ');

Temp = Temp.replace (/ \./g, ",");

[I] found .silence = Temp.replace (/ #/ g, ".");

Alert (temp);

}

app.findGrepPreferences.findWhat = "[\\l\\u]+\\d+[,.\\d]";

app.findGrepPreferences.findWhat = "\\d+[,.\\d"];

var Found = FindItems ();

var Temp;

for (var i = Found.length - 1; i > = 0; i--)

{

Temp [i] = trouve.contents.replace (/, / g, ' # ');

Temp = Temp.replace (/ \./g, ",");

[I] found .silence = Temp.replace (/ #/ g, ".");

Alert (temp);

}

Hi Cinzia,

As I told you privately, I think this grep code is better. Only, this line to change:

app.findGrepPreferences.findWhat = / ^-* [\d,.] + \d/.source;

Tags: InDesign

Similar Questions

  • If I click on "PIN to the browser" the sensitive axis is unselected and vice versa. I need object "PIN at the top of the browser" and 'sensitive pine' work at the same time. Any suggestions?

    In the latest version of muse to adobe, I have me against "PIN at the top of the browser" and 'sensitive pine' work at the same time.

    Now if I choose an object and the axis 'browser', "sensitive pine" is unselected and vice versa.

    The need is for the header with the logo and menu bar to be pinned to the top of the browser, so that the page scrolls in the header bar.

    Now when I click on the sensitive left axis for the logo and the sensitive right pin for the navigation bar, the "pin at the top of the browser" gets deselected.

    Any suggestions or workarounds will be appreciated.

    Kind regards

    Vijay

    Hi all

    Thanks for that bring to our attention. We will consider adding this feature in the future.

    RyanDoyle - it's an interesting hack you have found! Unfortunately, I wouldn't count on that it works like this in the future, as a bug which is to operate. If you drag the screen to change the width of the browser as a Muse, you'll see that the behavior of the elements in the status button (a menu, for example) is different from when exported. However, if you make a small change to your hack, so it should always work: set button "width sensitive" State instead. In addition, I don't see why all parts must be in separate to this job state buttons, but I've only tried a simple example myself.

    An another workaround I used is to create another, more breakpoint. For example, if I have a menu that is pinned to the top left of the browser in the dots stop, then in a breakpoint, I would pin in the center top of the browser. Normally, I wouldn't add more breakpoints, but there is a way that I found to work around the problem. Ryan workaround is perhaps the best way to go if you take my advice and use a status button sensitive width instead of the width of the browser.

    Hope this helps,

    Anna

  • How to add data to the table changed in sql developer at Apex and vice versa

    Hello

    I had tables of database with sql developer. But now, I have modified the database (new tables added + changed the data in the tables). However, in the Apex, I the old database. Is it possible to get the new Apex database with the data of the table changed so this database in both places (sql and apex developer) is exactly the same... Also the other way around.

    Thank you

    The database schema that contains the tables, is it associated with the workspace even you are searching through the APEX product t development?  Why I'm asking is, if they are the same schema, the tables that you MODIFIED should be appear in the sql for APEX workshop part.  Now reports and forms will NOT see the changes (unless you have actually added or updated definitions for column).

    Can you explain what exactly you were doing the SQL Developer to the tables in your schema?

    Thank you

    Tony Miller
    Los Alamos, NM

  • Lightroom gel when changing the library to develop modules (or vice versa)

    I've upgraded LR to the latest version, a couple of weeks ago and my computer also made an update of Windows 10 at the same time. Since this date, during the change of library modules (or vice versa) or when you export a photo in another application for further treatment, LR freezes and I end up stop and restart. I can't do more than two photos max before it freezes. Someone at - it ideas? Thank you

    .. as described here: Adobe Lightroom GPU troubleshooting and FAQ

  • Variable information from the Captivate .swf 8 integrated and vice versa

    Hello

    I use 8 Captivate and created a game in Flash with AS3.  I will have NO problem running commands from Captivate embedded Flash file, using the syntax:

    MovieClip (this.parent.root) .rdcmndNextSlide = 1;

    However, whenever I try to import or to export values for the variables defined by the user or even predefined such as cpQuizInfoPointsscored variables, the values do not translate back.  I tried using the same syntax as above to set the value of a variable (for example MovieClip (this.parent.root) .cpQuizInfoPointsscored = 20;).  Similarly, I tried to display the value of a Captivate variable inside the Flash file by setting an equal to the set value Captivate dynamic text field.  In the first case, nothing happens; in the latter case, the text field displays "undefined".

    I have not seen a post about this particular problem.  Any ideas on what I am doing wrong?  Or is that what I try to do possible?

    Thanks in advance for any thoughts.

    Look in the category film control: these can be changed (some examples are cpCmndMute, cpCmndCC).

  • How can I change my C drive D drive and vice versa, as I have a lot more memory on drive d.

    I want to Exchange C drive for the drive that I have more memory on how to do

    Thank you tony1939

    Space and memory are two different things.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-files/can-i-delete-over-100-foldersfiles-with-a-name/dfa16261-f3d0-4ab7-b519-91631b44b3de

    UTC/GMT is 00:14 on Sunday, November 20, 2011

  • Color cartridge loaded in the black print cartridge slot and vice-versa - now cannot remove the

    Accidentally, I loaded the new color and black cartridges in the wrong slots, and now I can't delete them.  How can I get them without breaking the printer?

    If you have a spare cartridge you can look and see a small crest on the top of the cartridge near the front.  This is the part that is stuck.  Using a blunt knife or the handle of a spoon to gently release the cartridge down a little should allow the cartridges to be released.

  • The layer mode to make text on it the light on dark areas and vice versa?

    Hello

    PShop CS6 extended.

    I want to make a watermark for photos and have the text weak and contrasting with background while for the length of the text I have, as she travels through darkest areas that he's lighter and when in the lighter areas, it goes darker.

    Thus, the line of text could go dark light then light and then dark...

    I will also then apply a bit of relief effect to it.

    I can't find an option to layer to give to this 'contrast' effect of the dark.

    Merlin3

    Typer in white and set its blending mode to difference. When you use the move tool to move the text layer it adapts automatically to the background color

  • change the status of a NIC of UP and down and vice versa?

    Hi, I just wanted to ask questions about how to change the status of a NETWORK adapter in ESX 3.5 of up toward the bottom using ESX commands (and vice-versa to walk down)

    concerning

    Jose

    You can also add/remove a vmnic a vSwitch or portgroup, using the esxcfg-vswitch command.

    esxcfg-vswitch - L vmnic0 vSwitch 0-> add vmnic0 to vSwitch0

    esxcfg-vswitch - U vmnic0 vSwitch 0-> remove vSwitch0 vmnic0

    -KjB

    VMware vExpert

  • An application developed in 32 bit deployable XE XE 64bits and vice versa?

    Hi members.

    My question is if there may be problems with the application developed on 32-bit database XE and that deployed to the 64-bit XE database and vice versa?
    Version of the apex is the same on both environments.

    Thank you very much for your answers.

    Hi user2983052,

    user2983052 wrote:

    Please change your login username of "user2983052" to something meaningful. Reference: Video tutorial how to change username available

    Hi members.

    My question is if there may be problems with the application developed on 32-bit database XE and that deployed to the 64-bit XE database and vice versa?
    Version of the apex is the same on both environments.

    Thank you very much for your answers.

    Oracle APEX application is deployed as a SQL script, so regardless of what OS/Architecture of the application is exported and where it is deployed.

    The only thing is that you can not deploy an application from a newer version to a version lower than Oracle APEX.

    For more details, see the Documentation Oracle APEX:

    Deploying an Application

    I hope this helps!

    Kind regards

    Kiran

  • Is it possible for my tags in Windows to reflect also on Mac and vice versa?

    Hello! I recently bought a MacBook and a new hard drive. I'm organizing my files on my Windows desktop. I already started to organize into folders, adding tags and authors and all that. But when I checked on my Mac, the metadeta was not there and vice versa. Please, I really need help. I search online and could not find a solution.

    Maybe this will help > http://thefamilycurator.com/moving-photo-metadata-between-windows-and-mac/

  • My keyboard is now "inverted comma" signs for the 'at' and vice versa. How can I fix it?

    my keyboard gives sign 'inverted commas' for the 'at' key and vice versa. How can I fix it?

    [Moved from comments]

    Wednesday, November 7, 2012 16:07:16 + 0000, jimYK wrote:

    my keyboard gives sign 'inverted commas' for the 'at' key and vice versa. How can I fix it?

    Go to control panel | Regional and Language Options. Keyboards and
    Translation? You put it in a language that does not correspond to the
    physical keyboard.

    Ken Blake, Microsoft MVP

  • PHOTOS, CHANGE THE NUMBERS UNDER PHOTOS

    IS THERE AN AUTOMATIC WAY CHANGE THE NUMBERS ON THE PICTURES IN MY PC PICTURES FOLDER?  BECAUSE WHEN I TRANSFER THE PICTURES FROM MY CAMERA TO THE COMPUTER, THEY HAVE A NUMBER ASSIGNED TO THEM TO THE DEVICE, WHEN I DOWNLOAD MORE SAME NUMBERS ARE TRYING TO LOWER THE LOAD, CAUSING ME TO GO ON RECORD AND A CHANGE THEIR NUMBERS SO THE NEW DOWNLOAD. SO IF I HAVE 150 PICTURES IS A WAY OF SAY BEGINNING WITH 0001 HOW THE BALANCE OF PHOTOS AUTO POSSIBLE CHANGE TO NEXT NUMBER

    THANKS FOR ANY HELP

    Scott - welcome...

    It depends on how you import your photos. You can define a new preference in (screenshot below showing the relevant section arrowed in red) and usually if you use for example 'Windows' a date folder will be created for each import so that the numbers are not duplicated. I hope this helps... R.

  • It takes up to 4 minutes for the player switch between library and Rip, and vice versa.

    I run Media Player 11 on my XP machine with spare 120G on the C: memory and 3G - recently, it takes up to 4 minutes for the player switch between library and Rip, and vice versa. I have re-installed twice but no change. No new software has been installed before this time.

    Hello Absno69,

    Thank you for your message.  You mentioned that there were no new software installed before that happens.  Were there any hardware changes or updates?  If this isn't the case, we will perform a system restore to a point that you know that your system is working effectively.  Click HERE for the system restore instructions.
    Please let us know if it did or did not help to solve your problem.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • How to change the automatic naming of photographs and videos?

    Hi all

    My best wishes for this new year

    The naming convention Z3c for photos and videos is not so easy to manage.

    so I would like to name the date and time instead of default numbering.

    I would say something like:

    "20150101_124655.jpg" (YearMonthDay_HourMinuteSeconds.jpg) instead of "DSC_0001.JPG.
    And if possible to choose are record (say within the "DCIM / Camera" instead of "DCIM/100ANDRO").

    Could you tell me how to do it please?

    Thanks a lot for your time,.
    Kind regards

    Guy

    To change the preset name of photos and videos is, I fear, not by any means possible, sorry :/

Maybe you are looking for

  • EMERGENCY - Thunderbird freezes, Can not see my mail

    It's really an emergency situation because my company works on email. I downloaded a huge message (many photos) and now Thunderbird freezes when I try to do something. I can't even scroll through my mail, let alone read. I tried to uninstall Thunderb

  • Satellite P205-S6277: video driver Sonix USB replaced chicony webcam drive

    Somewhere along the line;My Chicony 2.0 USB Driver for the webcam has replaced with a Sonix USB video driver.The video cam works well, but the snapshot control does not work. My laptop is a Satellite P205-S6277. How can I solve this problem?

  • Can Labview draw big data?

    Hi all When I was in the lab at school, I used labview to collect the raw data and plotted using a Matlab simple, However... here at work, they do not have a Matlab:) I'm trying to get 5K samples / s and he's not going to be given at least 1 hour...

  • Reinstalling Vista on a new hard drive after the accident.

    Hi, I bought a laptop Lenovo, which came with Windows Vista SP2. Recently, my hard drive crashed and I got a new hard drive. In this case, can I re - install Vista with product key provided on my laptop? If it is possible, how can I get the operating

  • Can I download Windows 10 and keep Windows 7 on a separate partition

    I have Windows 7 if I download Windows 10, can I download it on a partition on my hard drive so I can keep 7? If this isn't the case, I have Windows 7 on a disk, I can upload on a partition and level 10?