Problem with GREP search styles

Hello

Here's a script that finds all one to three digits and then selects only those numbers that are in exponent or use the style police by exposing open type.

This works if I'm looking for just any of these styles, but not both at the same time. When I use the script as written below to find the Exhibitor open Type or by exposing that he finds all the numbers. Why is this happening?

In addition, I built the script that filters all the figures for these styles, because I couldn't see how I could create a script that uses GREP itself searching for character styles.

Any help would be appreciated.

Thank you

Tom

myDoc var = app.activeDocument;
table below is all the figure of one to three words.
Notes end var = theGrepFinder (myDoc, "\\d {1,3}");
Here is a filter to get only those who are exposing (1936749411) or use SuperScripted (1884247155) of open Type.
var arrFiltered = [];
for (var a = 0; endNotes.length > a; a ++) {}
If (end notes [a] .position == 1936749411 |) {1884247155)
arrFiltered.push (endNotes [a]).
} / / end if
} //end for
Endnotes = arrFiltered;

functions *.
function theGrepFinder (docRef, grepFindIt) {}
app.findGrepPreferences = NothingEnum.NOTHING;
app.changeGrepPreferences = NothingEnum.NOTHING;
app.findGrepPreferences.findWhat = grepFindIt;
var arrGrepFindIt = myDoc.findGrep ();
Return arrGrepFindIt;
} //end theGrepFinder

I think that your test should be formulated as follows:

If ((notes de fin [une].position == 1936749411) |) (notes de fin [une].position == 1884247155))

As JavaScript OR is inclusive, this test passes if both parties are met.

Peter

Tags: InDesign

Similar Questions

  • Problem with GREP search

    I have a GREP search that finds characters in importing XML < i > and < /I > that surround it make italic text:

    Search text with ^ I ^ and ^ / I ^ around it. ITALIC

    app.findGrepPreferences.findWhat = "(\\^I\\^)(.+)(\\^/I\\^)";

    app.changeGrepPreferences.changeTo = "$2";

    app.changeGrepPreferences.appliedCharacterStyle = "italic";

    app.activeDocument.changeGrep ();

    The problem is that if there is two blocks of text in the para with the codes around him, he finds the first < i > and < /I > last code and put the text in italics .

    Thus, for example, "the quick brown fox < /I > < I > leaps over the < I > < /I > lazy dog as example text"

    as ' the quick brown fox < /I > jumps above the < I > lazy dog as example text ",.

    and not "the Quick Brown Fox jumps over the lazy dog as an example of text".

    I hope this has a simple fix, but disappointing because I thought I had nailed!

    Thanks in advance for any help (as always).

    Simon.

    Well, as the saying always Jongware, GREP is greedy and always want to pick up as much as the expression allows.

    Simply add the question mark after the sign more, and you get the result you expect.

    app.findGrepPreferences.findWhat = "(\\^I\\^)(.+?)(\\^/I\\^)";
    

    Hope that helps.

    --

    Marijan (tomaxxi)

    http://tomaxxi.com

  • Help with GREP search and replace

    I've never used grep before and I'm stumped.  I have a document that lists the times for different classes.  Times are variously listed as 9-10, 9-10, 9-10 or 9-10, to get examples.  The problem is that there may be no space or a space on the left or the right of the hyphen.  I want it all the time as 10:30 - 11:30, for example.  In other words, the link must have a space on each side of it.  I think that this could be accomplished with GREP search and replace, but I don't understand the syntax well enough to make it work.

    Can someone tell me how to write the search and replace expressions?  (Of course the real time could be any hours).

    Thank you!

    It is tempting to add spaces of * all numbers separated by a dash. If you don't know all time have some minutes, then it is safer to use this:

    (?<=:\d\d)>

    .. Replace with space hyphen space.

    He seeks the "settler, any digit, any digit" (which is * found * not * included *), followed by 'optional of a space, a hyphen, optional space' and must be followed by 'any number' (again, not counting this one). Since the figures before and after are * found * not * included *-which is due to the (? xxx) syntax - all that needs to be replaced is the dashboard itself. Making the space before and after the optional dashboard (using a single "?" immediately after each), no matter if it * is * a space or not, all the combinations will be found and replaced.

  • Problem with the search function

    I use firefox 10 and I have a problem with the search feature. If the word that I will try to find begins with the capital letter I can't find with control function if I write the word only with small letters. a the opposite. For example, if the word is 'Letter' I can't find this word if I type 'letter' in the search bar

    Is the option 'Option match case' in the verified search bar? If so, uncheck it.

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • Problem with Windows Search 'Windows cannot access the specified device, file, or path. May not be the appropriate permissions for access you to computing.

    I have a very annoying problem:


    OT: Problem with Windows Search
    When I try to use Windows Search in the menu start I get the message "Windows cannot access the specified device, file, or path. May not permissions to access you the item. I get this message no matter what I type in. Therefore, I can't find something on my computer and continually to achieve this result.
    Could someone please help me solve this problem?
    I tried what answers I could find other peoples messages online, nothing helps. I'd appreciate any help.
    Thank you very much.

    Hello

    You did changes to the computer before the show?

    I suggest you try the steps from the following link:

    Error "Windows cannot access the specified device, path or file" when you try to install, update or launch a program or file
    http://support.Microsoft.com/kb/2669244

  • Problems with CHM search &amp; Index after you import the Word Document

    Greetings,

    I recently inherited from all things RoboHelp at work, but the last person to work with our projects left 6 months ago.  I received a brief overview of how our CHM files are from the same word in HR 7 HTML document.

    Currently, I use RoboHelp HTML 9, but have problems with the indexing and search of an imported file in Word 2003 (.doc) features.  During my import, only a single topic is created and named after the source document.  I believe that this may be the root of my problems, but have not had much luck with a solution.

    I have stumbled my way through adjustment after adjustment, but feel I'm missing something obvious.  Any help would be appreciated.

    Thank you

    Ken

    Background:

    Our source documents have a working table of contents and topic structure 1 - 3.  When creating a new project and import the document, the table of contents are imported correctly.  TOC navigation links seem to work fine.

    I used the smart Index Wizard to find new keywords to topic titles and the text of the topic.  Unfortunately it seems that import only creates a single, named subject according to the word source document and associates so all the keywords of the unique subject.  When you try to navigate the index after the CHM is generated, all the links reference just the beginning of the document.

    When you use the search functionality in CHM, only a single result is returned for any search words.  This result is always the only subject, as described above.  The link to the results always picks you up at the beginning of the document, but highlights the key word throughout the document.

    When you import there is an Advanced button in any of the dialog boxes. Click and you'll be able to Paginate against selected styles. That will stop your document in the headings.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • I had a few problems with the search engines and history

    My default search warning back to Yahoo after a reset on my computer. Close Firefox keep one to change but by restarting the computer, it takes.

    I can't open the sidebar history. The option "view the history of your" opens its tab fine (the drop-down menu that says 'Show History Sidebar', 'clear recent history... ("ect.). But, when you click on the "Show History Sidebar", nothing comes. Can I use the "Show history" option, but the sidebar does not open for some reason any.

    I just finished with a complete analysis of the Microsoft Safety Scanner and it said not that there is anything wrong. I have not reset the computer again to see if something has changed although after the factory reset (see the 2nd paragraph) it seems returned to Yahoo (search engine he kept going to happen).

    I open the history tab in the menu of the toolbar, and everything seems fine here. I also had him always use private off all first browsing mode. After activating the option clear history when Firefox closes, I ended up having to reset to factory settings (things he saves were saved isn't really a problem) that doesn't seem to fix the problem with the sidebar of history not to come.

  • Compact Z5 notification problem with coverage of Style SCR44

    Hello

    I'm having a problem with my new phone compact xperia Z5 and cover it in Style SCR44.

    In fact I transferred messages of my Xperia SP in my Z5C with Xperia mobile transfer Wifi live.

    It has worked well.

    But after that, I noticed that I had 4 unread messages when I close my cover.

    Screen within 2 to illustrate my problem.

    The classic first unlock screen:

    As you can see, there are no unread messages.

    Now the screen Style cover:

    Here, I have 4 messages received, but no message in the app :/

    I tried a few solutions, as clear data for the widget to cover, remove the protective filter style and he add, delete all messages, change my default application instead of meeting and check if I had unread messages, etc.

    None of them have worked.

    Can someone help me please?

    Thank you in advance.

    PS: Sorry for my English I'm a French guy

    I tried what you say, bot no way, messages was still there!
    So I did a reset, and they disappeared!

    It is excessive, but at least it worked.

    Thanks for your help alexdon

  • Problem with the search for network path

    We have experienced a weird problem recently with our research. On a Windows 7 Machine, when you search for a file that is located on our file server, it will give you the files, but for ancient dates and not the most recent. In our case, when we find a file, I see the file is there but I do the search in the folder and it gives me no element matches your search if they have changed the 7/17 and later. Something before 7/17 is always available.

    I tried indexing, but I know that this will not work because it is a network location. Maybe is something that is wrong on the side of servers? This is a server of 2012. We have about 10 users affected by it, so the solution to the index of the network as a library location may not be enough and may just take us longer.

    Any ideas on if it's the workstation or the server? If so, what can be done to fix this? Any help is greatly appreciated!

    Thank you

    Andy

    Hi Andy,.

    The query is better suited in the TechNet forum, ask you to report the query in the following link to get the problem resolved.

    http://social.technet.Microsoft.com/forums/en-us/home?category=w7itpro

    Respond us if you have any technical questions and we will be happy to help you.

  • Problem with GREP statement

    Hi Experts

    I am trying to find the text using GREP option:

    < k6 >

    para 1

    para 2

    para 3

    < / k6 >

    by using the grep function

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = \r(.+?\r) "(?s) ' < k6 > < / k6 >"; "

    var myResults = app.activeDocument.findGrep ();

    while I will execute this script the paragraph end marker '\r' (SPACE) in the FIND/REPLACE dialog automatically replaced. If I change the space manually \r in the Find/Replace dialog box, it works fine. Why the execution of the script, this change occur? One has known this before.

    Please suggest.

    Thanks in advance

    Do you mean that the entrance seems to have changed to a space when you check what is in the search box? This is a normal behavior. Since you are using the Javascript strings, for example '\t' and '\r' cescodessont * immediately * translated in their literal characters * before * all processed more far. So you don't write '\r' in the dialog box search, you write a hard return literal character. The Find/Replace dialog box cannot display this character on the screen, and it then displays a space.

    You say "if I change \r it works great"-you mean that this is * not * works if we leave it like that? Because it should work perfectly. (And you can actually have a bit of fun by inserting all sorts of 'special' characters literally in the search - box try tab or newline).

    But if you mind for aesthetic reasons, use '\\r '. The double backslash is also a special and is Javascript string exhaust replaced (immediately) with a single backslash. The chain that goes into the Find dialog box is '\r', and is what InDesign will translate to a mandatory return when he treats your search string.

  • problems with the search by using the CIS application.

    Hello

    We are able to connect to the server of Stellent of our J2EE application using our java code CIS.
    while performing research sometimes we get the error and sometimes it works fine (no change in the code)
    We use the socket to SCS connection type to connect via adapterconfig.xml
    Server details:

    CS: 10gR 3

    Please let me know the reason why he acts differently and on what basis we receive this error is also not known. :(

    ... On our J2EE server console, we get the following:

    2009-03-13 14:37:08, web-0 420, WARN (com.stellent.cis.server.api.scs.protoco
    l.impl.HDAProtocol) - could not find the end of header marker! ()
    2009-03-13 14:37:08, web-0 420, WARN (com.stellent.cis.server.api.scs.protoco
    l.impl.HDAProtocol) - did not read all the headers entry, attributing the type EXERCISE
    WN_TYPE

    -------------------------------------------------------
    Of the CommandException stack trace:

    com.stellent.cis.client.api.common.CreateAPIObjectException: error reading the answer of the content server: com.stellent.cis.server.filetransfer.SCSContentTransferStream: could not initialize class com.stellent.cis.client.api.scs.search.impl.SCSSearchResponse with the object of type com.stellent.cis.server.filetransfer.SCSContentTransferStream
    at com.stellent.cis.client.command.impl.services.CommandExecutorService.executeCommand(CommandExecutorService.java:62)
    at com.stellent.cis.client.command.impl.CommandFacade.executeCommand(CommandFacade.java:158)
    at com.stellent.cis.client.command.impl.BaseCommandAPI.invokeCommand(BaseCommandAPI.java:84)
    at com.stellent.cis.client.api.scs.search.impl.SCSSearchAPI.search(SCSSearchAPI.java:92)
    at com.pg.emfg.ewps.stellent.service.impl.StellentDMSServiceImpl.searchString(StellentDMSServiceImpl.java:348)
    at jrun__search2ejspb._jspService(jrun__search2ejspb.java:124)
    at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
    at jrun.jsp.JSPServlet.service(JSPServlet.java:106)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    to jrunx.scheduler.ThreadPool$ DownstreamMetrics.invokeRunnable (ThreadPool.java:348)
    to jrunx.scheduler.ThreadPool$ ThreadThrottle.invokeRunnable (ThreadPool.java:451)
    to jrunx.scheduler.ThreadPool$ UpstreamMetrics.invokeRunnable (ThreadPool.java:294)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    Caused by: com.stellent.cis.client.api.common.CreateAPIObjectException: error reading the answer of the content server: com.stellent.cis.server.filetransfer.SCSContentTransferStream: could not initialize class com.stellent.cis.client.api.scs.search.impl.SCSSearchResponse with the object of type com.stellent.cis.server.filetransfer.SCSContentTransferStream
    at com.stellent.cis.client.api.scs.impl.SCSObject.intialize(SCSObject.java:130)
    at com.stellent.cis.client.api.scs.impl.SCSServerBinder.intialize(SCSServerBinder.java:91)
    at com.stellent.cis.client.api.common.impl.CISAPIObjectFactory._initializeObject(CISAPIObjectFactory.java:250)
    at com.stellent.cis.client.api.common.impl.CISAPIObjectFactory.createObject(CISAPIObjectFactory.java:181)
    at com.stellent.cis.server.api.scs.impl.SCSCommand.prepareResponse(SCSCommand.java:300)
    at com.stellent.cis.server.api.scs.impl.SCSCommand.execute(SCSCommand.java:225)
    at com.stellent.cis.client.command.impl.services.CommandExecutorService.executeCommand(CommandExecutorService.java:57)
    ... 16 more

    Thanks in advance

    Prasad.V

    Hi Prasad,

    The above error is thrown when the socket with Content Server connection is terminated before that Content Server is able to send a full response. Most often, this occurs when the connectionTimeout for the CIS adapter is set to a shorter time than necessary for the Content Server service call ends.
    Note: The error message above also can be lifted during network downtime. Before proceeding with the solution below, you must make sure that there is no problem of network between the CIS Forum and the content server environment.

    -To implement the solution, please perform the following steps:
    1. open a browser and go to the page of information system Audit in the Content Server Administration section.

    2. in the Sections Tracing information section, select system, requestaudit, searchcache searchquery for the text box active Sections.

    3. make sure the Full Verbose Tracing above than the active Sections text box is checked.

    4. click the update button.

    5. at the top of the System Audit information page, click the link View Server output.

    6. on the page out of the server, click the clear button. Leave this window open.

    7. through the application of the CIS, submit the longest race of service or who causes the above error.

    8 return to the window of the browser in step 6, and then click the Refresh button.

    9 review the requestaudit tracing messages and find the service call that takes the most time. In most cases, this will be a GET_SEARCH_RESULTS call, other calls for service can also take some time. Below is an example of line tracing requestaudit showing a second service call 45.536.

    02.09 requestaudit 11:07:54.523 LONG_SEARCH_CUSTOM_SERVICE IdcServerThread-30944 [dUser = sysadmin] [QueryText = dDocTitle + % 3csubstring % 3F + % 60test % 60] [StatusMessage = success] 45.536 (dry)

    10 once the longest running service call is identified, add a reasonable buffer (e.g. 10-15 seconds) to take account of the additional load on the server. This amount of time of the call of service and the amount of memory buffer will be the value used for the connectionTimeout value.

    11. in the adapterconfig.xml, the node connectionTimeout for the CIS adapter to the value calculated in step 10. Please note that the value for the connectionTimeout configuration is specified in milliseconds. For example, if calling the function running longer, more buffer memory is about 60 seconds, then the value of connectionTimout can be assigned to 60000.

    12 restart the CIS Forum and the test.

    Hope this helps

    Thank you
    Srinath

  • Problems with Windows search and PDF files

    Server 2008 R2, the client is Windows 7.  I store invoices in digital format PDF in one hand.  The server took to the index folder and its contents, added the last addition to Adobe pdf, but if I search documents for words I know are there, nothing is found.  In another post, it was suggested to ensure that the system was in the full access permissions list.  I have the server to remove and rebuild the search index, everything has not helped.  Any suggestions are greatly appreciated.

    I have this problem on my own.  Do NOT access through dfs.  Go directly to the server.  In our case, \\harry.com\AR\invoices won't work not, but \\Apollo\AR\invoices doesn't.  It's as simple as that.

  • I have a problem with saved searches.

    I have a hp laptop with Windows 7 64 bit. Last week, I decided to find out what was in a folder called saved searches. I was surprised to see she had a section called indexed locations containing 7,000 points and another called everywhere that contains 240 000 elements. Can someone explain to me in simple terms what is the purpose of this folder? I've never used so far. Most of the items it contains is identified in "computer gibberish" and is not immediately recognized by me. It takes a lot of disk space? Can I remove items, and the implications of this fact? There are listed in pictures so I tried to delete a. He sent to the trash, but it also removed in Windows Photo Gallery so I had to restore it.

    GordonW

    Hi Gordon!

    Please read this: http://windows.microsoft.com/en-us/windows7/improve-windows-searches-using-the-index-frequently-asked-questions

    See you soon,.
    Julia

  • Problem with channel search

    Hello

    My DB Version is 11.2.0.4.

    ICH have a column with the text less or more, and it should be possible to put all the lines that contain the key words in the search string.

    For example, the column contains the following text

    Maintenance for SVU-battery with NetConsult

    maintenance for USV battery NetConsult

    USV - battery with netconsult interview

    USV - battery with netconsult

    maintenance battery UPS

    maintenance battery NetConsult USV


    So if my searchstring is USV battery or maintenance USV battery NetConsult or maintenance for SVU-battery with NetConsult

    The result must contain all of the lines with the key words.


    All ideas are welcome.

    Certainly sounds like it would be a type of thing Oracle text.

    In regular SQL, assuming search keywords can be in any order and all search words must exist in the text resulting... something like...

    SQL > ed
    A written file afiedt.buf

    1 with t :) (txt)
    2 Select 'Maintenance for SVU - battery with NetConsult' of all the double union
    3 select 'maintenance for USV battery NetConsult' Union double all the
    4 Select 'maintenance for SVU - battery with netconsult' of all the double union
    5 Select 'USV - battery with netconsult' of all the double union
    6 select 'maintenance battery UPS' Union double all the
    7 select 'maintenance battery NetConsult SVU' double
    8         )
    9  --
    10 end of sample data
    11-
    12, s (ss) as long as)
    13. Select 'NetConsult USV battery' double
    14         )
    15-
    16 end of search criteria
    17-
    18, as t_words)
    19 select txt
    20, regexp_substr (txt,'[^-] +', 1, level) as t_word
    21 t
    where the 22 regexp_substr (txt,'[^-] +', 1, level) is not null
    23 connect by level<= regexp_count(txt,="" '[="">
    24 and txt = txt prior
    25 and prior sys_guid() is not null
    26         )
    27, s_words like)
    28 select regexp_substr (ss,'[^] +', 1, level) as s_word
    29 s
    30 connect by level<= regexp_count(ss,="" '="">
    31         )
    32-
    33 - end of data and search criteria split
    34-
    35 select txt
    36 from t_words
    37 join s_words (upper (s_words.s_word) = upper (t_words.t_word))
    38th group txt
    39 * having count (distinct t_word) > = (select count (distinct s_word) of s_words)
    SQL > /.
    TXT
    ---------------------------------------------
    Maintenance for SVU-battery with NetConsult
    USV - battery with netconsult
    maintenance battery NetConsult USV
    USV NetConsult battery maintenance
    USV - battery with netconsult interview

    5 selected lines.

    However, something like that would be really efficient on large amounts of text because of the amount of split that must take place.

  • Problem with player search - only the First Instance is highlighted

    I use WIN 8.1 with Adobe Acrobat Reader DC [15.10.200056.167417 'updated 12/18/15"indicated in the program properties] as my default PDF reader.

    Until recently, I was able to do a search of words/texts of .pdfs using CTRL-F, who showed me every instance highlight of this word.  I would simply hit 'find' several times.  These days, only the first occurrence of the word is highlighted.  Along the right margin are yellow "tics" that, in my opinion, indicate the existence of other occurrences.

    If something has changed in the drive?  Some can tell me how to regain the ability that I hope

    mikec2222 wrote:

    Bernd - Do I understand you though, when you search for "" this document, you can find a second occurrence of "the" highlighted by pressing 'find' or 'next' or 'enter' again?  If this is true, my copy of AA CD player must be faulty.  I can't wait to see your response.

    It's true.

Maybe you are looking for