Find Hyphenation words in cs6

Hi.
  I need to find the hyphenation word with line number at the end of the line,as in the below image.
For these 4 occurence, I used   Em dash/En dash/Hyphen/Hyphen for hyphenation.  If anyone knows help me.

Hi,
  If a word contains more than 1 line, it is hyphenated. But, for the below occurrences is not hyphenated but its also reporting as hyphenated when using the line concept.
1. if url contains more than 1 line
2. word contains dot (.) . if it contains more than 1 line
But actually its not hyphenated
Can anyone help me.
- Sudha K

Similar Messages

  • GREP: Find hyphenated word followed by a word

    Trying to setup a GREP Style
    "prior-year adjustment" - don't want adjustment to hyphenate
    "self-review/management" - don't want management to hyphenate
    "value-in-use calculation" - don't want calculation to hyphenate
    I was thinking I could setup a GREP style so that any word that followed a manually hyphenated word could be set to No Break.
    Fairly stumped on this one.

    This is weird
    \-\w+\s\w+
    Will find "-year adjustment"
    But it won't apply the "no break" to it.
    It has for other words. But once the line breaks over and is hyphenated it won't work.
    For the word already autohyphenated it hasn't applied
    For the red highlighted one it is applied.
    If I override the Body Text style - it works. But not until I do that. And there's no "+" symbol beside the style.
    Sort of makes that unworkable for me as it has to apply automatically.

  • Search and also Copy failed if "_" is in the second part of a hyphenated word. Is it a Bug?

    Hello,
    we are using PDF for our technical documentation, so we have a lot of variable names like "var_techUsage_true", etc.
    We gernerate these pdf files with the apache fop 1.1 processor. In our documents you can find several tables. Sometimes
    the cells. are very tiny. In this case we use some hyphenation rules, this works really good for german text, and the tables are
    drawn very nice ( without overflows ).
    But if you hyphenate a word like "Jesus_latschenhersteller_dachverbandsvorsitzender".
    The result will be:
    Jesus_latschen-
    hersteller_dach-
    verbandsvorsit-
    zender
    Now I tried to search for the "word" the adode reader tells me "nothing found".
    If I have some thing like that:"Jesus_latschenherstellerdachverbandsvorsitzender".
    The result will be:
    Jesus_latschen-
    herstellerdach-
    verbandsvorsit-
    zender
    Bingo! the reader will find the "word".
    So I take a very close look at the source of the PDFs
    Good
    Bad
    Q
    BT
    /F5 8 Tf
    1 0 0 -1 0 9.16399956 Tm
    [Jesus_latschen-] TJ
    1 0 0 -1 0 18.76399994 Tm
    [herstellerdach-] TJ
    1 0 0 -1 0 28.36400032 Tm
    [verbandsvorsit-] TJ
    1 0 0 -1 0 37.9640007 Tm
    [zender] TJ
    ET
    Q
    q
    Q
    BT
    /F5 8 Tf
    1 0 0 -1 0 9.16399956 Tm
    [Jesus_latschen-] TJ
    1 0 0 -1 0 18.76399994 Tm
    [hersteller_dach-] TJ
    1 0 0 -1 0 28.36400032 Tm
    [verbandsvorsit-] TJ
    1 0 0 -1 0 37.9640007 Tm
    [zender] TJ
    ET
    Q
    q
    So also copy will produce an "internal Error"
    So my question is: How can I get a fast workaround or a Bugfix?
    Best Regards
    Markus

    Hi Pat,
    Adobe Reader 10 and 11.
    I want to search a hyphenated Word, what is in our content the name of a programming variable.
    For a better readablity we use the "_" to seperate parts. Like "my_first_variable".
    Sometimes the names of the variables are very long. Like "this_is_the_longest_name_i_ever_used_in_my_tiny_little_sourcecode".
    I did a screen capture.
    Kraftfahrzeugsteuer à 1 hit
    Kraft_fahrzeugsteuer à 1 hit
    Jesuslatschenherstellerdachverbandsvorsitzender à 1 hit
    Jesus_latschenhersteller_dachverbandsvorsitzender à 0 hits !!!!
    Best regards
    Markus

  • Problem indexings hyphenized words in PDFs

    Hello everyone on this forum
    In the new site we are building, I am using Oracle Text to implement the search functionality.
    I have problems indexings hyphenized words in PDFs.
    The code I used to create the content table and the Oracle Text index, is like follows
    CREATE TABLE JMMC_TST_OracleText( article_id NUMBER PRIMARY KEY
    , desc VARCHAR2(30)
    , doc BLOB DEFAULT empty_blob()
    COMMIT ;
    I populated the doc column from a database column in our CMS, containing a PDF document. Just for testing, also populated it from a PDF file, using TOAD for Oracle 8.6.
    EXEC CTX_DDL.create_preference( 'jmmc_BSJC_lexer2', 'BASIC_LEXER' );
    EXEC CTX_DDL.SET_ATTRIBUTE( 'jmmc_BSJC_lexer2', 'SKIPJOINS', '-' );
    EXEC CTX_DDL.SET_ATTRIBUTE( 'jmmc_BSJC_lexer2', 'CONTINUATION', '-' );
    CREATE INDEX JMMC_TST_INDEX
    ON JMMC_TST_OracleText( doc )
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ( 'LEXER jmmc_BSJC_lexer2
    STOPLIST CTXSYS.EMPTY_STOPLIST' );
    COMMIT ;
    The following sql
    select ctx_report.describe_index('JMMC_TST_INDEX') from dual ;
    SELECT err_timestamp, err_text
    FROM ctx_user_index_errors
    ORDER BY err_timestamp DESC;
    shows that indexing went without errors, and index was correctly created.
    The word: processo
    (that in the PDF is hyphenized visually as
    ........... pro-
    cesso .....
    ) is indexed as 2 tokens instead of just one token, as the following sql shows
    select token_text
    from dr$JMMC_TST_INDEX$i
    where UPPER(token_text) = UPPER('CESSO')
    or UPPER(token_text) = UPPER('PRO') ;
    The following query returns 1 result
    SELECT SCORE(1), article_id , doc
    FROM JMMC_TST_OracleText
    WHERE CONTAINS( doc, 'pro cesso', 1) > 0 ;
    The following query returns 0 results
    SELECT SCORE(1), article_id , doc
    FROM JMMC_TST_OracleText
    WHERE CONTAINS( doc, 'processo', 1) > 0 ;
    Strange thing is, several months ago I tried this test with the same PDF, and everything went by without any problem.
    The tests were done on different machines, and on both occasions I used Oracle 10.1.0.5.0.
    Looks like I'm overlooking something or maybe some obscure setting (of DB, server or system) is causing the problem.
    Suddenly hyphenized words in PDFs, stopped being indexed correctly.
    Searched in the manuals and in this forum, and could not find a solution. Any help from anyone in this forum ?
    Thanks in advance.

    Hello everybody on this forum
    As the initiator of this thread, I am glad that after some months, someone else is looking at this issue.
    To add/clear to the confusion, I have followed Roger Ford suggestion.
    Here’s the test I ran
    1) Created a minimal test file (using Windows Notepad) with the following content:
    ABC-
    DEF
    Hex view of above file is:
    41 42 43 2D 0D 0A 44 45 46 00
    A B C - . . D E F .
    2) Created test table
    CREATE TABLE JMMC_TST_OracleText(
    article_id NUMBER PRIMARY KEY
    , fmt VARCHAR2(30)
    , doc BLOB DEFAULT empty_blob()
    The main difference to Roger Ford test case is: my content column is a BLOB instead of a VARCHAR2.
    The reason why my doc column is a BLOB, is because the site I’m building, content come from our CMS, and has different types both text and binary (eg Word, PDFs, etc), that I need to index together.
    So I use a mixed-content column in a materialized view, to prepare/consolidate/hold all contents I index.
    3) I inserted 1 row in above table (using TOAD for Oracle 8.6.), putting my minimal test file in the doc column.
    4) Create Preferences and Index
    EXEC CTX_DDL.create_preference( 'jmmc_BSJC_lexer2', 'BASIC_LEXER' );
    EXEC CTX_DDL.SET_ATTRIBUTE( 'jmmc_BSJC_lexer2', 'SKIPJOINS', chr(45) );
    EXEC CTX_DDL.SET_ATTRIBUTE( 'jmmc_BSJC_lexer2', 'CONTINUATION', chr(45) );
    COMMIT;
    CREATE INDEX JMMC_TST_INDEX
    ON JMMC_TST_OracleText( doc )
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ( 'LEXER jmmc_BSJC_lexer2
    FILTER CTXSYS.AUTO_FILTER
    STOPLIST CTXSYS.EMPTY_STOPLIST
    FORMAT COLUMN fmt' );
    COMMIT;
    Note: the basic lexer SKIPJOINS and CONTINUATION characters, were set the same as the hyphen character used in test file.
    5) Tokens indexed:
    select token_text from dr$JMMC_TST_INDEX$i
    Shows:
    ABC
    DEF
    6) Filter indexed content and generate a plaintext version:
    create table JMMC_filtertab (
    query_id number
    , document clob
    commit ;
    begin
    ctx_doc.filter( 'JMMC_TST_INDEX', '1', 'JMMC_filtertab', '11', TRUE);
    end;
    Hex view of plaintext version is:
    41 42 43 2D 20 20 44 45 46 00
    A B C - D E F .
    Note that the original end-of-line chars (0D 0A) were replaced by 2 SPACES.
    It looks like the filter replaces end-of-line chars by SPACES, and feeds the lexer, with something like:
    ABC- DEF (instead of: ABC-DEF) ;
    So the poor lexer, sees 2 tokens and has no clue they originally were only one hyphenised token.
    This is consistent with what Meta Link Note 124624.1 - Intermedia Text & Continuation Character ('-') in PDF says.
    7) Just for comparison the result of Roger Ford test (using a VARCHAR column instead of a BLOB) is:
    Hex view of the filtered plaintext version is:
    61 62 63 2D 0D 0A 64 65 66 00
    a b c - . . d e f .
    So the main difference seems to be different filtering behaviour for BLOB or VARCHAR columns, in dealing with end-of-line chars.
    I have also tried other combinations of INDEX/LEXER preferences (i.e. SKIPJOINS/CONTINUATION/FILTER/NEWLINE,etc), and different file types (WORD,PDF) which means I also tested with “true binary content” and different end-of-line chars.
    No matter what I tried, results were all the same: if I index a BLOB column, I’m not able to index hyphenized lines correctly.
    According to the manuals, the CTXSYS.AUTO_FILTER were supposed to deal correctly with mixed-content columns if given the correct information (ie FORMAT COLUMN)
    Hope this triggers a response from someone.
    Thanks to all the people that took time to look at this problem.

  • Need to add any Pointer/Bookmark for the Hyphenated words

    Dear Experts,
    Im very new to Scripting.
    I'm creating a Validation tool which shows hyphenated words in a ListBox & i done it well in VB6.
    Now all my need is i have to jump to the location in the document while clicking the ListBox Item.
    Is there any options to do this?
    Looking forward your comments.
    Thanks in advance.
    SaRaVaNaN.N

    Hi Try this code...
    I created this for windows XP, Indesign CS4.
    #targetengine "session";
    var myDoc = app.activeDocument;
    var stories = myDoc.stories.everyItem ().getElements ();
    var myFind = new Array(); var myCounter = 0;
    var times1, times2;
    times1 = new Date().valueOf();
    //-----------------------------For display---------------
    var w = new Window ("palette", "Hyphenated words");
    var list = w.add ("listbox", undefined, "", {numberOfColumns: 1, showHeaders: true,columnTitles: ["Hyphenated Word"], columnWidths: [185]});
        list.maximumSize.height = $.screens[0].bottom-200;
    var myStory_id = new Array(); var myitem_id = new Array();
    main();
    times2 = new Date().valueOf();
    var timeTaken = ((times2-times1)/1000);
    displayWindow();
    if (myCounter > 0){
    w.show();
    else { alert("Double Hypehnation Not Found"); }
    function main(){
        var lineCount;
        myResetFindChangeGrep ();
        app.findGrepPreferences.findWhat = "(\\w+)([-~=])(\\w+)";
        var myIndex = new Array();
        for (i=0; i<stories.length; i++){
            myFind[i] = stories[i].findGrep(true);
            for (j=0; j<myFind[i].length; j++){
                lineCount = myFind[i][j].lines.length;
                if (lineCount>1){               
                    var story_id = i; var myFind_id = j;
                    var myText = myFind[i][j].contents;
                    addItem(myFind[i][j], i, j);
                    myCounter++;
                    }//End if
                }//End of Find Length
            }//End Story length
        //alert(myIndex.length);
    //------------------------Function Declarations--------------
    function displayWindow(){
        //window declared as global variable here
        var panel1 = w.add('panel');
        panel1.minimumSize.width = 210;
        var group1 = panel1.add('group');
            group1.orientation ='row';
        var close_ = group1.add ("button", undefined, "Close", {name: "ok"});
        group1.add("statictext", undefined, "Fetched in "+timeTaken+" sec");
            close_.maximumSize.width = 44;
        list.onDoubleClick = function ()
                if (this.selection != null ) {
                var myIndex = this.selection.index;
                var storyNum = myStory_id[myIndex];
                var findNum = myitem_id[myIndex];
                var selectText = myFind[storyNum][findNum];
                app.select (selectText, SelectionOptions.replaceWith);
                app.activeWindow.zoomPercentage = 200;
        close_.onClick = function () {w.close ()}
    function addItem(myItem, sto_id, item_id){
        list.add ("item", myItem.contents);
        myStory_id .push(sto_id);
        myitem_id .push(item_id);
    function myResetFindChangeGrep(){
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
        app.findTextPreferences = NothingEnum.nothing;
        app.changeTextPreferences = NothingEnum.nothing;
    Green4ever

  • How can I configure hyphenation settings so that InDesign does not hyphenate already hyphenated word

    For example:
    twenty-seven
    It's okay to break at the hypen in the word, but I don't want either twenty or seven to be hyphenated. Is it possible to configure this in the hyphenation instructions? I don't see a way to do it other than manually adding every hyphenated word to the user dictionary.
    Thanks!

    A super-easy way to prevent this is to add a discretionary hyphen after the hyphen in a hyphenated word. This can be easily accomplished by doing a global find-and-replace.
    Find: -
    Replace: -^-
    This will allow all hyphenated words to break ONLY after the hyphen.
    Hyphenation settings should be determined based on the overall text. It is good to specify the minimum characters a word should have to be hyphenated — to prevent the hyphenation of very short words — but if you set that minimum too high just to avoid double hyphenated words, you may end up with too loose lines of text.

  • How to find a word written with two fonts...?

    Hi,
    I have a 200+ pages document that contains some words with the first letter in Times regular and the rest in Times italic. Is there any way to find those words in the document?
    Thanks

    Ooooo, Dave ....
    Annabelle, a non scripting solution is the following.
    You cannot search for words with multiple fonts. However, since you can search for words in one font, you can exclude 'good' ones.
    I will be assuming you have a regular document, with just black text ...
    In Search & Replace, GREP, search for "\b\w+\b" with a font style of "Regular" and replace with formatting: text color red. Be sure not to accidentally put anything in the replace text field -- it should be entirely empty. Now all entirely Regular words are red.
    Repeat with the font style "Italic". Now all words that are entirely Regular or Italic are in red.
    Search for "\b\w+\b" with a text color of Black. This will find all words that are neither entirely in Italic nor entirely in Regular.
    In case you never used it before, the GREP expression means "a word boundary -- one or more word characters -- a word boundary". Essentially, it does a 'Find entire word' for any length of words.
    Note that if you have words in, say, bold, bold italic, or 46 Light Italic, you will have to mark these as well with the check colour, or else you'll also find them 'bad'.
    You might want to create a new swatch for marking, so you can delete it afterwards, replacing with Black again.
    ... Are you familiar with how to use scripts? It might be a bit easier if I wrote a tiny script, although my method will find all rogue formatted text.

  • The Firefox find function seems to have become CAPS or non-caps specific, so that typing a word in non-caps will not find matching words with one or more capital letter.

    The find function seems to have changed in Firefox. Before, when doing a (CTRL + F) find, the search was not CAPS-specific or non-caps-specific. In other words, if I typed in "firefox" (no caps), it would find the words "firefox", Firefox", or "FIREFOX", regardless of capitalization. Now, however, the find function will only match the exact same capitalization. This totally undermines the usefulness of the function, and is a major hassle. Please fix it.
    == This happened ==
    A few times a week
    == I noticed in in the last two or so weeks.

    I am having a similar problem. The following page has the word Dangerfield in several times. My browser will get to Dang and turns pink
    http://www.genuki.org.uk/big/eng/HEF/ProbateRecords/WillsD.html
    Is it my Browser or is there a problem with Mozilla?
    I have also noted on other Google searches the same problem. Te term is listed in the page but Ctl F will not find the term

  • Find/Change words (with GREP) and apply a style...

    I need a Script for Find/Change words with GREP, and apply a paragraph style...
    Thanks...

    Hi Marcos,
    If you want the script to create character styles: Bold , Italic, Bold Italic, etc, and replace local formatting with these styles, use scripts in post #3.
    But if you want find and change words, or/and replace local formatting with styles defined by you, use FindChangeByList script.
    If the latter, I recommend you to download and install Record Find Change script (written by Martin Fisher).
    Then choose settings you need in Find-Change dialog – make sure they work as expected – and run Record Find Change script. A Notepad/TextEdit file will pop up with a line containing the recorded setting. Copy it, open FindChangeList.txt, delete the contents of this file and paste the line you just copied (or add it to the bottom of the file).
    Repeat the process for all find-change operations you need.
    Finally run FindChangeByList.jsx to make all changes in one go.
    However, while using Record Find Change script, you may encounter a problem: it doesn’t record paragraph and character styles placed inside a group. But you can write references to such styles like so:
    appliedParagraphStyle:app.activeDocument.paragraphStyleGroups.item("Style Group 1"). paragraphStyles.item("Paragraph Style 1")
    Kasyan

  • How to find a word with different font format (e.g. italic and regular in one word)

    Hi people,
    I need to find a word, prefferably using GREP or simple Find/Replace tool.
    Sometimes, when I get source text to paste into InDesign, some word's format is messed up. First letter is italic and rest is regular or otherwise (or any other font format). How can I find such words automatically. For example:
    Example
    would really appreciate any help.
    best regards
    JMG.

    Hi,
    If I had to do that, using Multi-Find/Change, I would play it like:
    With MFC, I create a set of the 2 regex. So, one click to fix your problem.

  • How do I find duplicate words in a Numbers spreadsheet?

    Hello, I've created my first document on Numbers and am trying to figure out how to find duplicate words. Ideally, a list of words that repeat in the document and how many times. Is this possible? Thank you in advance for the advice

    It's easy enough to find and count duplicate entries, especially if they are all in a single column, but if you want to count individual words within multi word entries, the problem is more complicated.
    Here's an example for the 'simple' case, using a familiar 155 word passage from English literature.
    The words in the passage are separated into a single line for each word, and stripped of all punctuation. This may be done in Pages, or in Text edit, or in pretty much any word processing software or text editor. Paste the passage into a WP or text document, then use the application's Find/Replace feature to replace all of the spaces with returns. I would also do a second pass replacing all double returns with single returns, then repeat that until Find/Replace reported replacing zero occurrences.
    Punctuation was stripped using Find/Replace
    The prepared list was pasted into column A of a Numbers table.
    Formulas:
    B2: =COUNTIF($A$1:A2,A2)
    C2: =IF(AND(B>1,B=COUNTIF($A,A2)),ROW()-1,999999)
    Fill both down their respective columns to the end of the table.
    The small table is inserted as a Basic table using the Tables button. It contains a Header row, but no Header columns.
    Formula:
    A2: =IFERROR(OFFSET(Table 1 :: $A$1,SMALL(Table 1 :: $C,ROW()-1),COLUMN()-1),"")
    Fill right into B2, then fill both down to the end of the table.
    Descriptions of the functions used, along with their syntax and at least one example of their use in a table are available in the Numbers '09 User Guide, which may be downloaded via the Help menu in Numbers.
    Regards,
    Barry
    PS: Regards to the late Mr. Shakespeare, and thank you for providing the text used.

  • Where is the list of hyphenated words located in mac os x

    I would like to create a list of words in Armenian for auto-hyphenation. Is there a way I can create this list and install it where the English hyphenated word list is installed, so that any word processor can auto-hyphenate an Armenian text?
    After collecting the words and making the word bank, I need to know:
    1. How to create the hyphen? whether by inserting hard hyphen? or soft hyphen? or some other character that Mac OS X will interpret it as auto-hyphen sign.
    2. What format should I save this list? RTF, textonly, etc.
    3. Where should I install this file?

    >>  Once I know what those numbers represent
    I would suspect--though I don't know for certain--that the hyphenation-marking digits work as in other UNIX programs.  Here are two leads:
    http://lists.gnu.org/archive/html/groff/2001-03/msg00026.html
    http://www.helsinki.fi/~tapirine/publications/Pirinen-cla-2010.tex
    Search them for "odd" or "even" to get started.  Good luck.

  • Search all Database to find a word

    Hello all,
    I want a pl sql query to find a word like "book" in all oracle database, in all tables and their contents.
    Thanks in advance
    Arvin

    A couple of solutions from Michaels...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from cols,
           xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
           columns result varchar2(10) path '.'
    where table_name in ('EMP', 'DEPT')
    TABLE_NAME           COLUMN_NAME          SEARCH_STRING        RESULT   
    DEPT                 DNAME                ES                   RESEARCH 
    DEPT                 DNAME                ES                   SALES    
    EMP                  ENAME                ES                   JONES    
    EMP                  ENAME                ES                   JAMES    
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   PRESIDENT
    EMP                  JOB                  ES                   SALESMAN 
    9 rows selected.Of course these could also have been found by doing a search on the forums or using google.

  • How to finds specific words in each sentence?

    import java.io.*;
    import java.text.*;
    import java.util.*;
    public class FindingWordsSpecific {
         static String[] days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "every Tuesday"};
      public static void main( String args[] ) throws IOException {
               // the file must be called 'myfile.txt'
               String s = "myfile.txt";
               File f = new File(s);
               if (!f.exists())
                    System.out.println("\'" + s + "\' does not exit. Bye!");
                    return;
               BufferedReader inputFile = new BufferedReader(new FileReader(s));
               String line;
               int nLines = 0;
               while ((line = inputFile.readLine()) != null)
                    nLines++;
                   System.out.println(findTheIndex(line));     
               inputFile.close();
           public static String findTheIndex(String sentence){
                String result = "";
                String[] s = sentence.split("\\s");
              for (String s1: s){
                   for (String s2: days){
                        if (s1.equalsIgnoreCase(s2)) {
                             if(s2.matches("every Tuesday")){
                                             }else if (s2.matches("every Wednesday")){
                                              }What is wrong with it because I tried to find "every Tuesday" in
    myfile.txt: "Go fishing every Tuesday and every Wednesday"
    There is big problem with split statement because it takes each word not more than a word.
    I need to have "every Tuesday" not "Tuesday". How to make it correct codes?

    I am going to give you a picture of how the output will look.
    Here are two sentences from myfile.txt:
    Go fishing every Tuesday and every Wednesday
    Meet with research students on Thursday
    I need to read from myfile.txt and to find specific words in each sentences like this output:
    Every Tuesday : Go fishing
    Every Wednesday : Go fishing
    Thursday : Meet with research students
    Ok. make sense? Now I am trying to figure out how to find specific words in each sentence from myfile.txt.
    That is why I have difficult with the splits statement and loops. Like this:
           public static String findTheIndex(String sentence){
                String result = "";
                String[] s = sentence.split("\\s");
              for (String s1: s){
                   for (String s2: days){
                        if (s1.equalsIgnoreCase(s2)) {
                             if(s2.matches("every Tuesday")){
                             }else if(s2.matches("every Wednesday")){
                             }else if(s2.matches("Thursday")){
                             }else{
                                  System.out.println("That sentence is not working");
                return result;
      }So look at the "Thursday" it is working the output because I have split statement to give me only one word not more than
    a word in sentence. So there is big problem with more than a word in sentence like this "every Tuesday" and it won't work at all because of split. Could you please help me how to do that? I appreciated for that help. Thanks.

  • Grep to find any word NOT in quotes

    Hi
    Can someone help me with this grep
    I need to find all words that are NOT in quotation makrs
    For example:
    Hello and "Good Morning"
    I would want to find the words:
         Hello
         and
    but not the words:
         Good
         Morning
    I tried with lookahead and lookbehind like this:
    (?!=")\w+(?!")
    but it just selects one character less
    If anyone can help I'd really appreciate it
    Thanks in advance
    Davey

    Hey guys!
    Thanks a lot for your help!
    @Beginner_X
         Your first grep was almost perfect, however, it didnt find the first word of a story (since it didnt follow a space or a return)
         Your second post worked perfectly!! - Thanks a lot
    @csm_phil
         I was looking to select each word separately, not consecutive words - although this will also come in handy
         Your grep worked, however I had to add the question mark to make it ungreedy
         because if the sentence had 2 quoted words, it would select from the beginning of the line till the last quote
    @Laubender
         For some reason your grep is functioning just like mine - it finds the word Good and Morning
    Thanks again
    Davey

Maybe you are looking for

  • Oracle Express Server v.6.3.1.0 installation problem

    I downloaded oes6301nt.exe - Oracle Express Server - NT (118MB) from the Oracle web site, unzipped it and start using Universal Installer to install it for stage/product.jar. I specified Oracle Home as OraExpress81 and path as F:\Oracle Express\olap

  • What is the best way of converting everything in a result set into a string

    hello folks What do you think is the best way of converting everything in a resultset into a string??? At the moment I'm using rs.getString(i); everywhere (no matter if the underlying datatype is a date or whatever..) it converts automatically everty

  • How to use EEWB to add fields in business partner page

    Hello All I am working on CRM 5.0 EEWB I am trying to add new field in the business partner page I followed the steps for creating the project and the extension but I faced some problems 1-I chose the package BBP_BUPA_MAIN    BBP Business Partner Gen

  • Dynamic casting in java

    Hello everyone.... i am having a problem as follows: i have a method in my project which is taking a reference of object type... i want to cast the object to the passing type,bt i dont want to cast explictily inside the method... can something be don

  • Report on Consolidated Status

    Hi Guys, I am looking for a report which can be generated for all the NC in consolidated status for which Request are waiting in PRD buffer and not imported to PRD yet. scenario Whenever we consolidate a NC all the request goes to PRD buffer and wait