Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2018
    Posts
    3

    Default Regular expression does not match full string

    I have a script that will exclude PDF page numbers, but it compares the last digit.
    My script regular expression in my script: Page\s+\d+\s+of\s+\d+

    The text in file1: CONFIDENTIAL Page 3 of 111
    The text in file2: CONFIDENTIAL Page 3 of 119

    Note that the last digit of each string is RED
    I tried "Page\s+\d+\s+of\s+\d\d\d" but got the same results

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    The regular expression looks ok. How did you define it in BC3, and did you mark the grammar element as unimportant?

    After the element is defined, you also need to uncheck the element name to make it unimportant:
    http://www.scootersoftware.com/suppo..._unimportantv3
    Aaron P Scooter Software

  3. #3
    Join Date
    Aug 2018
    Posts
    3

    Default

    Thank you, that worked. However, now when my grammar string is on an orphaned line (either on the left side or the right side), it shows up as important. Can I fix this?

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    An unimportant grammar element should be unimportant even if on an orphan line. If you click the blinking cursor into the text, is this text detecting as the correct grammar element or a different one (bottom status bar of each pane shows the name of the grammar element the blinking cursor is within).

    Or, under the Session menu -> Session Settings, Importance tab, is "orphan lines are always important" enabled?
    Aaron P Scooter Software

  5. #5
    Join Date
    Aug 2018
    Posts
    3

    Default

    I've tried "orphan lines are always important" checked and unchecked and got the same results. I reload after each change. When I click on the text of the orphaned line, I see my grammar name. This grammar works on lines that are not orphaned. I want to mark as unimportant any line that has matching grammar text, whether it's orphaned or not orphaned. ... I'm getting closer

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    The Orphan lines are always important should be unchecked. If you are still having trouble, could you email us:
    1) A pair of sample files
    2) A full screen screenshot
    3) Your BCSupport.zip from the Help menu -> Support; Export
    4) a link back to this forum thread

    We should be able to recreate the screenshot with your files and bcsupport.zip, to figure out what is going on.
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •