Find special characters in the name of the Image

Hi all

Request:

1. the need to find special characters or unwanted characters in the name of links (Figure$ .eps, abcd? cde.jpeg etc.)

2. the name links allows only [a - z] or [A - Z] or [0-9]

3. name links does not allow special characters such as (i.e.,?,!, @, $ etc...)

4. white space not allowed

Very urgent request...

Try the Code is:

var myLinks = app.documents[0].links.everyItem().getElements();
alert(myLinks.length)

for(i=0; i<myLinks.length; i++)
{
    var mySplit = myLinks[i].name.split(".");
    var myFinal = mySplit[0];
    
    for(k=0; k<myFinal.length; k++)
    {
        if(String(myFinal[k]).match(/[a-z]/g) !=null || String(myFinal[k]).match(/[A-Z]/g) !=null || String(myFinal[k]).match(/[0-9]/) !=null )
        {
            alert(myFinal);
            break;
            }
        
        }
    }

Thanks in advance

Siraj

Hi Siraj

Try this out

var myLinks = app.documents[0].links.everyItem().getElements(),
    badCharReg = /[^A-z0-9]/g,
    l = myLinks.length,
    badLinks = [],
    linkName = "";
while (l--) {
    linkName = myLinks[l].name.split(".")[0];
    if (badCharReg.test(linkName)) badLinks.push(linkName);
}
if (badLinks.length) alert("Check out these\n"+badLinks.join("\n"));
else alert("Have a nice day");

Trevor

Tags: InDesign

Similar Questions

  • Create these special characters in the name of the file as test.? docx or test? PDF in the OS window

    Hello

    Is there a possible way to create these special characters in the name of the file as test.? docx or test? PDF to test the goal?

    I do programming to detect this type of special characters in the file name. This modified script will this type of invalid char file appropriate name, so I need to have the sample to check if my script works.

    I have OSX or Linux. Is there no workaround solution I created in the window itself?

    or can someone create for me so I can go and download instead?

    Thank you and best regards,
    back4more

    Hi Backformore,

    Thanks for posting your question in the Microsoft answers Forum. For any question concerning the development of programs, visit the MSDN hereforums.

  • empty data file with special characters in the name

    Hi all

    I'm having a problem with an empty data file which is in recovery mode.

    Before the following has been a success:
    ALTER database create datafile 'fully_qualified_file_name' as 'fully_qualified_file_name ';
    recover data file "fully_qualified_file_name";
    ALTER database datafile 'fully_qualified_file_name' online;

    But this time it does not work as I get an error:
    ORA-01516: file nonexistent journal, data file, or temporary file
    Using the file id does not work either.

    When I created a record of control file I see the data file has special characters in the name:
    ' / oracle/PRD/112_64/dbs/PSPR3I ^? ^?'

    Since it is empty, it would be possible to create the data file void anothr
    using the:
    ALTER database create datafile ' / oracle/PRD/112_64/dbs/PSPR3I ^? ^?'
    as ' / oracle/PRD/spdata2/r3i_8/r3i.data8';

    and then recover datafile 'fully_qualified_file_name ';
    ALTER database datafile 'fully_qualified_file_name' online;

    How orders oracle faced with special characters?

    Thanks for your advice

    user6737818 wrote:
    Hi all

    I'm having a problem with an empty data file which is in recovery mode.

    Before the following has been a success:
    ALTER database create datafile 'fully_qualified_file_name' as 'fully_qualified_file_name ';
    recover data file "fully_qualified_file_name";
    ALTER database datafile 'fully_qualified_file_name' online;

    But this time it does not work as I get an error:
    ORA-01516: file nonexistent journal, data file, or temporary file
    Using the file id does not work either.

    When I created a record of control file I see the data file has special characters in the name:
    ' / oracle/PRD/112_64/dbs/PSPR3I ^? ^?'

    It should work using a file as the definition of source file number and a new name for the new file. Works for me:

    orcl> alter database create datafile 7 as 'c:\tmp\newname.dbf';
    
    Database altered.
    
    orcl>
    
  • where are the special characters in the new Pages?

    where are the special characters in the new Pages?

    Menubar pages: Edit: Emoji & symbols, or control-command + space combination. Same situation in other Apple applications. In addition, available as a menu item from the menu entry in the menu bar to the right, Finder.

  • Chips and other special characters in the App World descriptions

    How is one makes chips and other special characters in the description of the app in the supplier portal?  I see various descriptions app with chips so I know it's possible.  I tried Googling the answer, but to no avail.  Can someone point me to the documentation for it?

    Thank you

    Lester

    I think it's just the Unicode text, so if you include these characters when you submit the form, they will display.

    Your question is perhaps more on how to insert these characters into the HTML form. To do this, because I need it rarely, I didn't copy and paste of a website where I can find the required text. For example, Google for 'unicode ball' and you can find one of them on one of the first findings of the research, such as the Wikipedia article.

    Some people probably have their systems set up to type Unicode directly from their keyboard, but I never got to determine the modern way to do this (and the last time I checked, years, Unicode in operating systems support was still largely missing).

  • How to remove special characters from the string using translate() without typing all special characters?

    Hi all

    I am trying to remove special characters without the help of regular expressions.

    translate (the column name or string,'!@#$ & * (* () _) * "" :} {?}) >? /, «, » ')

    I want to eliminate this manual process to give all special characters using a chr() or ascii() function.

    Please show me the way.

    Thanks in advance

    Similar to the solution of Michael...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select "[it comes of the #] [more amazing!") Test @# "$* & $%) assuming chain cost $ 5 000' double Str)
    2, i like (select level 1 c from dual connect by level<=>
    3 less
    4 Select + 32 (level-1) double connect by level<=>
    5 less
    6 select + 58 (level-1) double connect by level<=>
    7 less
    8 select + 91 (level-1) double connect by level<=>
    9 less
    10. Select 123 + (level-1) from dual connect by level<=>
    11 less
    12. Select 255 double
    13            )
    14, ts as (select level r, substr (str, level 1) c
    15 t
    16 connect by level<=>
    17             )
    18, tf as (select row_number() (order for r) r
    19                    ,ts.c
    20 TS
    21 I join on (i.c = ascii (ts.c))
    22             )
    23 select replace (sys_connect_by_path(c,'!'),'! ') Str
    24 TF
    25 where connect_by_isleaf = 1
    26 connect r = prior r + 1
    27 * start with r = 1
    SQL > /.

    STR
    -----------------------------------------------------------------------------------------------------------------------
    Thisisthemostamazingtest¸astringcosting5000

    Or something as horrible as this...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select "[it comes of the #] [more amazing!") Test @# "$* & $%) assuming chain cost $ 5 000' double Str)
    2, I like (select replace (sys_connect_by_path (chr (c), 'A'), 'A') as tr)
    3 of)
    4 select c, rownum r
    5 (select 32 + (level-1) as the double connection by level c<=>
    6                         union
    7 select + 58 (level-1) double connect by level<=>
    8                         union
    9 select + 91 (level-1) double connect by level<=>
    10 the union
    11. Select 123 + (level-1) from dual connect by level<=>
    12 union
    13. Select 255 double
    14 tri 1
    15                        )
    16                  )
    17 where connect_by_isleaf = 1
    18 log r = prior r + 1
    19 start with r = 1
    20            )
    21 select translate (str, 'A' |) TR, 'A') as str
    22 * t, I
    SQL > /.

    STR
    --------------------------------------------------------------------
    Thisisthemostamazingtest¸astringcosting5000

  • How to get special characters in the oracle column only

    Hi all

    with spec_tab

    as

    (

    Select ',' col1 of double

    Union

    Select ',' col1 of double

    Union

    Select 'something' double

    )

    Select col1

    of spec_tab

    How to get special characters in the oracle column only

    You mean like this?

    -------------

    WITH spec_tab
         AS (SELECT ',,,,' col1 FROM DUAL
             UNION
             SELECT ',' col1 FROM DUAL
             UNION
             SELECT 'some thing' FROM DUAL)
    SELECT col1
      FROM spec_tab
      where translate('~'||col1,'~0123456789abcdefghijklmnopqrstuvwxyz ','~')<>'~'
    

    Output:

    -----

    COL1

    ,

    ,,,,

    See you soon,.

    Manik.

  • Special characters in the classic report

    Hello

    I'm unable to display special characters in the classic report.

    "For example""" is coming as ' '.

    Is there a way to fix this?

    It seems that use characterset "WE8ISO8859P15" is causing this issue, which is a single-byte character set and so unable to encode these characters.

    Please correct me if I'm wrong.

  • I have Adobe Acrobat Pro XI.  I went to special characters from the Edit menu and choose some emoji as Favorites, but I can't understand how to insert in the document.  How can I insert special characters into a document?

    How can I insert emoji or other special characters in a document using Adobe Acrobat Pro XI?  I went to special characters from the Edit menu and may not understand how to insert the special character in the document.

    He's not that kind of editor. You can use the characters in a font. If you can select a font with the emoji, which fits into the case, and then enter the characters, it can work.

    This suggests that you try to do TOO MUCH with a PDF file. It is a common thing, but the message should be: everything simply because you can edit a PDF file, does not mean that it is the most effective way for you to do your job.

  • Hello. Can he the word pdf conversion to retain the original character of the special characters of the algorithm? the formulas have special mathematical symbols. Conversion them kept?

    Hello. Can he the word pdf conversion to retain the original character of the special characters of the algorithm? the formulas have special mathematical symbols. Conversion them kept?

    The equations are a problem. If the equation is text, you can be lucky if you have the fonts on your system. Most of the time I have try, the fonts in the equation are garbage. Expect to have to retype the equations and some special characters. Much also depends on the existence of the fonts on your system. Just in my experience, the equations are almost impossible to convert.

  • How to find special characters in a string of give/sentance

    Hi all

    I have a task to complete with the time to give. Because I'm not very good in PL/SQL, I need you're help.
    Condition is:

    I must come with the SQL or PL/SQL code which should return and find the hidden or special character in the name of the data files in a database. There are nearly 400 + database are present in almost any flavor of UNIX, and I need to check the database each.

    As you know, the name of the data file will be like this:
     /u02/instance_name\oradata\datafile_01.dbf 
    So, it should avoid these things and only discover the special characters in the name of the data file.
     
    a-z , A-Z , 0-9 and \ 
    Please keep in mind that... I'll be pulled the script Oracle the Oracle 9i client that will access all the databases of Oracle 9i to 11g in a short and give me the result.

    Please help me to solve this problem and let me know if you need more information.

    Hello

    Mukesh says:
    Hi Frank,.

    It is an excellent service. Thanks for you response.
    I want to change the query that... I should get only the name of these data files that are special characters of detention. I don't know how to put it in that condition. :(

    Here's one way:

    SELECT  file_name
    ,       ...     -- other expressions, if you want any
    FROM    dba_data_files
    WHERE   TRANSLATE ( file_name
                      , '?0123456789.ABCDEFGHIJKLMNOPQRSTUVWXYZ\_/abcdefghijklmnopqrstuvwxyz'
                      , '?'
                      ) IS NOT NULL
    

    Among other expressions, you can put in the SELECT clause (if you wish) is a copy of the TRANSLATE function, you had in your message. That would underline exactly what characters rendering invalid file name.

  • DBMS_LOB. FileExists returns 0 for BFILE with special characters in their names

    Hello.

    As part of a migration, I'm trying to load these binaries (mostly PDFs) in a column of type blob of a table (oracle 11 g).

    Before loading the file, I get the positioner with bfilename and search for fileexists.

    The problem is that I found several false negatives for dbms_lob.fileexists, all files with special characters in their names, like a e i o u, for example.

    Any sugestion to work around?

    I have change the message to add nls info, as it is migth play an important role

    The database is in AMERICAN AMERICA WE8MSWIN1252

    (Don't know why)

    and my session is in SPANISH SPAIN

    After a lot of tryal and error, I found the answer. Here it is:

    src_loc: = bfilename ('MYDIR', Convert (l_filename, 'AL32UTF8'));

    Now, plsql block "sees" the file.

  • Find special characters in a string

    Hi all, I am using Oracle 10 g.

    I have a column name with special characters. How can I replace the special characters in the column with space and no space based on the special character. Please see the example below. can I use REGEXP_REPLACE?

    create table
    create table sample_test (
      Name    VARCHAR2(20 BYTE))
    Insert a table
     insert into sample_test values ('O''NEIL')
         insert into sample_test values ('B.E.VICTOR')
          insert into sample_test values ('WILLIAM,L')
           insert into sample_test values ('MARY-ANNE')
               insert into sample_test values ('VON_ANCKEN')
                insert into sample_test values ('BROWN;L')
    I would like the following output
     
    Special Character         Name         Expected Name                  Remarks      
     
    Single Quotes            O'NEIL                  ONEIL                          Remove quotes and no space        
    Dot                      B.E.VICTOR         B E VICTOR                          Replace with space        
    Comma                      WILLIAM,L         WILLIAM L                          Replace with space        
    Hyphen                      MARY-ANNE         MARY ANNE                          Replace with space        
    Underscore                VON_ANCKEN         VON ANCKEN                          Replace with space        
    Semi Colon              BROWN;L          BROWN L                          Replace with space      
    Please notify.

    Thank you
    Bob

    A simple solution without the use of regexp:

    -- Test Data
    with sample_test as
    (
    select 'O''NEIL' name from dual union all
    select 'B.E.VICTOR'  name from dual union all
    select'WILLIAM,L' name from dual union all
    select'MARY-ANNE' name from dual union all
    select'VON_ANCKEN' name from dual union all
    select'BROWN;L' name from dual
    )
    -- Query:
    select name old_name,
           translate(replace(name,'''',''),'.,-_;','     ') new_name
    from sample_test;
    

    Explanation:

    REPLACE deletes the quote
    TRANSLATE replaces point, comma, dash, semicolon and underscore

  • How to find and remove special characters in the file name?

    I have a files in various Windows Server 2003 with a special character in its name, which cause problem with backup software, I Don t know which character is because in the browser that they do not appear and command line, they are listed only as a mark of the interrogation and for this, I Don t know how I'll find and delete then.

    Thank you.

    Ask in the forum Windows Server:
    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • How do I search for special characters in the Explorer?

    I have a collection of 1000 + files in an FTP folder. The problem is that about 50 of them contain & symbols in their file names. I need to find and delete all the files containing the symbol '& '. I thought it should be easy enough to search for the symbol '&' File Explorer. However, in doing so, nothing happens. It returns all files. Is it possible to search for special characters like '&' in the file Explorer?

    Type filename: * & in the Explorer search field, it finds all files where appears the & character in the file or file name extension.

Maybe you are looking for