Need GREP To Identify Multiple Patterns

Hi
I am attempting to format text by identifying it with GREP patterns, then applying styles via InDesign's paragraph and character styles. I was able to get half of what I wanted using Nested Styles, but that solution doesn't seem to fit most of the cases in the files with which I am working. Here are the patterns I am trying to identify in a single GREP statement::
00% OFF
Over 00% OFF
$00.00
00.00
One of the above four patterns will always appear at the beginning of the paragraph. I want the GREP statement to identify the text that matches any or all of those patterns, so that I can apply the text styles. I was able get partially there by doing the first two "% OFF" scenarios using nested styles, then trying to do the "$00.00" and "00.00" with a GREP statement. I could never get the grep statement to completely work. Either it would ignore the "$" sign, or the first two digits before the decimal place. And I'm not even sure mixing Nested Styles and GREP is a wise way to go. Can someone assist me in getting a GREP statement that will identify any of these potential combinations. The document I am working on has other patterns that differ from the four above, but if I can get the above four, that will be about 80% off the project, and will minimize a lot of hand editing to get the font treatments correct.
Thanks in advance for any help you can lend on this.

Thanks for your samples. First of all, live isn’t always easy ;-)
Apply some colors to your character styles and you will see, that your first style isn’t honored (OFF > off)
Second: It is a big difference for grepstyles, if you enter a softreturn in the same paragraph or you enter a hard return (new paragraph).
Since the scope of grepstyles is paragraph based, your second para did not know the first one.
So in your special example you could use (with|coupon)[^\r]+
That means, search for: with or coupon, followed by anything that is not a hard return, multiple times.
But if you have other phrases, this may not work or must be extended.

Similar Messages

  • How to use multiple patterns for masking/format the input text

    Hi All,
    I am using Jdeveloper 11.1.1.5 and i have a requirement where i need to format my input Text value in these below patterns:-
    Format
    Example
    AA9A 9AA
    EC1A 1BB
    A9A 9AA
    W1A 1HQ
    A9 9AA
    M1 1AA
    B33 8TH
    A99 9AA
    AA9 9AA
    CR2 6XH
    DN55 1PT
    AA99 9AA
    For Example :-  If user puts value as EC1A1BB, it should automatically changed to EC1A 1BB
                                 if user puts value as W1A1HQ, it should be automatically changed to W1A 1HQ and so on..
    If it could have been one format , i might have followed this :- https://blogs.oracle.com/jdevotnharvest/entry/get_social_security_numbers_right
    But for multiple patterns i am not able to get through to the proper solution.
    Is there any way to achieve this ? Please suggest.
    Regards,
    Shah

    For the validation you should be able to use one regular expression where you add the logical or (|)  (check the doc http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html) between the groups. If none of the patterns matches you have an error.
    For the for formatting I'm not sure you can use only one expression.
    I suggest to write one method which does the checking on and the formatting may be using an array of patterns to check and iterate the patterns in a loop. Once you found a match you can read the needed format from another array (or an other dimension if you prefer to use a multidimensional array).
    Timo

  • How do I set multiple pattern matching Vi's and make overlappin​g pattern matches to count as one?

    Hello! I'm a student and I'm currently making a project using pattern matching.
    My patterns are from chick foot/feet.
    I'm  created multiple pattern matching VI's to detect all the feet because I find it difficult/impossible to match all the feet with a single pattern/template.
    However, when using multiple pattern matching VI's some pattern matches detect the same foot, hence overlapping.
    So how can I make the overlaping pattern matches to be counted as one?
    Thank you in advance

    Thank you for replying Sir Zwired1.
    I'm still a newbie in using LabVIEW so pardon me if I can't understand fully
    The objective of my project is to detect all the feet through pattern matching and count the pattern matches made.
    "Keep a 2D array of counts, initialized to zero and the same size as your array of possible locations, and increment the value every time you get a match. If multiple pattern matching attempts result in a match a given location in your count array might be "3" but all you care about is if the number is greater than zero."
    I'm sorry, but how do you do this? BTW, I'm using vision assistant.

  • Need help in creating multiple signature forms?

    need help in creating multiple signature forms that can be digitally signed in adobe reader

    Automator gets a bit unweildy when trying to vary things outside of what the actions provide.  Since you are already using an AppeScript in your workflow, might as well do the whole thing:
    set baseFolder to (path to desktop) -- the location to create the folder
    display dialog "Please provide a new folder name:" default answer "test"
    set folderName to text returned of the result
    repeat -- keep repeating until a number is returned
      display dialog "How many subfolders?" default answer "5"
      set theNumber to text returned of the result
        try -- test the result
          set theNumber to theNumber as integer
          exit repeat -- success
        end try
    end repeat
    tell application "Finder"
      try -- make new folder
        set newFolder to (make new folder at baseFolder with properties {name:folderName})
      on error number -48 -- skip errors if the folder is already there
        set newFolder to ((baseFolder as text) & folderName) as alias
      end try
      repeat with X from 1 to theNumber
        try -- make new subfolder
          make new folder at newFolder with properties {name:folderName & X}
        on error number -48 -- skip errors if the folder is already there
        end try
      end repeat
    end tell

  • Acrobat X Pro - I need to export a multiple page pdf into a powerpoint presentation - no editing ability needed

    Acrobat X Pro - I need to export a multiple page pdf into a powerpoint presentation - no editing ability needed

    Then you need to upgrade to Acrobat XI Pro, which you can do from the Adobe Products Page.

  • Need help Setting up Multiple Static Ip , 1 for each port of the fios router

    Need help Setting up multiple Static Ip on my fios router
    I have been trying to figure out how to set up multiple ip in my fios router.
    However I kind of managed how to set up multiple static ip However the way I want it is for each port of my router to have an external ip signed to it. ( like 4 different modem in 1 )
    Verizon gave me 5 static ip but they can not help me how to set it up.
    Have anyone here done more then one static ip on different ports? I assume that the process will be the after the second static ip.

    You want to set up Static Nat. You will not assign the IP to a port, but rather to a local machine. Figure out what machines you want your IP's to go to. Under the firewall section you will see static nat. Pick the machine you want and enter one of the IP's you were assigned.

  • Need help in identifying fields of sd report creation

    Hi Experts,
    I need to create report in sd from manual report .The fileds in report are taken from Quickbooks.so inorder to create report in sap I need to identify fields  in sap first.we dont had functional guy so i need help in identifying fields in sap for below mentioned report.
    Report: invoice distribution report-service billing for all states.
    Fields:customer number,customer name,city state,SAP Document number,Invoice date,period(month,year)invoice number,invoice type,currency,invoice amount in usd.
    Please help me in suggesting tcodes or table names from where i can fetch these fields.
    Thanking you in advance.
    Regards,
    narasimha.

    Hi Experts,
    Finally with all above suggestions i have chosen tables vbrk(billing document header data),kna1(customer header),vbrp.
    1.I created view to find the output of report with conditions as follows:
    tables:vbrk,kna1,vbrp
    vbrk-vbeln(invoice number)
    vbrk-fkart(invoice type)
    vbrk-fkdat(invoice date)
    vbrk-waerk(currency)
    vbrk-netwr(netvalue)
    vbrk-kunag(customer number)
    kna1-name1(customer name)
    kna1-ort01(customer city)
    kna1-regio(customer state)
    join condition:
    kna1-mandt=vbrk-mandt
    kna1-kunnr=vbrk-kunag.
    when i execute the report i am getting same value for lot of times.
    i am confused how to include sales document number.I hope sales document number and invoice are different.
    2.i have also added vbrp-aubel and join condition as
    vbrk-mandt = vbrp-mandt
    vbrk-vbeln = vbrp-vbeln.
    but when i execute the report i am getting lot of duplicated with same value and unknown invoice numbers.
    please let me know where i went wrong.
    is  there any standard adhoc report so that i can manipulate it with above requirement.
    vf05n is somewhat useful .is it possible to add  customer details in this??
    Thanks&Regards,
    narasimha.

  • What product do I need to just combine multiple pdfs into one pdf

    What product do I need to just combine multiple pdfs into one pdf. Thanks

    Are these files fillable forms?
    Could you need to combine more than 100 MB of files?

  • App needs to run on multiple DBs; can parsing schema/ ref owner be dynamic?

    I have an app that needs to run on multiple databases. Is there a way to create something like an app-level item -- something that only needs to be set once -- that can be referenced to specify the parsing schema, and all of the instances of "reference table owner" used to specify the source for DML? Or (I've not tried this yet) can I just NOT set the value of reference table owner? In my case, the reference table owner for all tables is the same as the parsing schema.
    Thanks,
    Carol

    hi Varad -- I should have been more specific. The application does not need to access multiple databases; rather, it will be installed on multiple databases, operating only on the DB on which it's installed. (Same functionality on each DB, same DB schemas in each, different data in each.)
    So, I'm wondering if there is a way to have the parsing schema somehow be set automatically based on information in the database, or if I'll have to create a slightly different version of the app, w/ different parsing schemas, for each database.
    It was recommended to me (perhaps by you, I can't recall) that the parsing schema be the same as the owner of the tables that the app accesses; the table owner is different in each of these databases, so that is the source of this problem (if indeed it is a problem).
    Thoughts?
    Thanks,
    Carol

  • Identify multiple Excel selection ranges passed to VBA.

    If I select two ranges of a worksheet from within the worksheet/Excel itself and run a VBA (macro) to perform operations in VBA on the ranges, how do I identify those two selections in the VBA code to work with
    them?
    In other words, in the work book drag with the mouse to select a range, then Ctrl+drag a second range then call/run the macro/VBA. (For example, right-click drag cells B11 to B14, release, then Ctrl-right-click cell F1 (or F1 to F7). Then run the macro.)
    How do I reference those two selected ranges (B11:B14 and F1 or F1:F7from the example) in the VBA code?
    I see many example within VBA of selecting multiple ranges, but how do I refer to ones "passed" to the macro? (I'm thinking it would be something like Application.Selection.first and Application.Selection.second, etc but VB doesn't show anything
    to choose past Application.Selection .)
    Is it even possible to identify that two selections exist or is it all one selection, even if they are disjoint ranges?
    If it's all one selection (Application.Selection), how might I identify two non-contiguous ranges from within the selection and "split" them into two?
    I just found out that in Excel I can select three non-adjacent cells from any row or column, but I can only copy those three cells if they are on the same row or column. I didn't try more cells.
    This is all in Excel 2007.

    JimC, you get my ANSWERED vote!
    As near as I can tell, it does almost exactly what I need. I tested with four non-contiguous cell selections and the loop displays each one in the order selected.
    What it doesn't do is give the range of a contiguous area in the order of selection, meaning selecting e20 to a3 (dragging up to the left) gives range a3 to e20. Essentially, a range bigger than one cell is always identified as lowest order cell
    to highest order cell.
    I can handle that if needed by selecting individual cells through the range (as long as it's not too many cells) in the order I want to deal with them.

  • HP color laserjet 4600 parallel port is wierd need help to identify

    Hi I have a laserjet 4600 and it has a wierd looking parallel port and I can't seem to find out the name for it so I can buy it online. I have tried looking for it online but the only thing that comes up is the IEEE 1284 36 pin parallel port. Can anyone help me identify this port so I can connect it to my computer?
    Thanks

    dan4757 wrote:
    I am running windows 7 64 bit trying to connect to a HP color laser jet 4600. We have tried multiple times to get a Notebook to load the driver. Everything works and asks to print a test page. When you press print test page nothing happens and nothing will print. 
      This is a working printer. It is presently hooked to a network and it works from it. I am trying to make it work from my notebook. I am using a ethernet cable wired directly to the Jetdirict card. 
      Do I need to set up a network. I know the IP of the printer and can not access it from the Notebook.
    This should work for you.  I've installed several printers using a Jet Direct this way:
    Install the printer manually.  Go into Devices and Printers -> Click "Add a printer" then select "add a local printer" and select the option for "Create a new port - Standard TCP/IP Port" and click next.  Type the IP address of the printer into the Hostname/IP Address field then click "next" -  Choose Hewlett Packard Jet Direct from the Standard drop down menu then click next.  You will need to select your printer model/driver from the list and then click next.  

  • Edit - Item-Mask - Identifier Type Pattern Rule

    Hi
    I need to have the mask for the text item like this.
    1. No Space or tabs, or punctuation marks allowed
    2. Start with Alphabetic Char
    3. Then Any number or Alphabet or underscore
    - This is in general known as the standard identifier pattern
    rule in many languages.
    How do I Achieve this oracle Forms.
    Any HINTS!!
    Thanking you in anticipation
    Regards
    Santosh
    null

    Hi yxrkt,
    I'm afraid that you would custom the data type with the debugger extension.
    This blog shared us a simple sample about "how to create a type visualizer for a custom data type", maybe it could provide useful information for you.
    http://blogs.msdn.com/b/vcblog/archive/2012/07/12/10329460.aspx
    The MSDN document shared us some information about how to create custom views of native objects in the debugger.
    https://msdn.microsoft.com/en-us/library/jj620914.aspx?f=255&MSPPError=-2147217396#BKMK_Expressions_and_formatting
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Identifying multiple audio tracks on Apple TV

    I like to add the director's commentary tracks to TV shows and movies I encode for my iTunes library. Until recently, usually I've been able to identify them through my Apple TV by holding down "select" on the remote, going into "audio" and then seeing things like:
    English (Stereo)
    English (Surround)
    English (Commentary)
    but now the same file would show something like:
    English
    English (Surround)
    English
    iTunes still shows the audio track descriptions and I noticed that there is some change in the whether anything at all appears in brackets after the language name when you play around with the Dolby Digital setting in the Options pane on Apple TV, so I'm wondering if I've somehow changed a setting? Can anyone help me out here?

    I've been able to do this by changing the language on the second track to something other than English. I use Quicktime Pro to open the file with multiple audio tracks and hit cmd+J. The screen that comes up shows each of the tracks in the Quicktime file. Click on the 2nd audio track and under one of the property tabs ("other" or "presentation" or something like that)you can choose a different language. Just pick one and save. Add the video to iTunes again and re-sync. Now you should be able to choose "french" (or whatever you designated your second audio to be) when you hold play.
    If that doesn't work, there is one other step but I can't remember if it is necessary: In QT Pro, in addition to changing the language, you may need to assign the 2nd audio track as an "alternate track" to the video. You do that in the "cmd+J" screen as well

  • How can i identify multiple apple devices under a same appleID for Facetime usage ?

    hi
    i have an apple ID and multiple apple devices
    i want to be able to use facetime to communicate between my various devices
    so, how can i identify my ipad from my ipod from my mac, so that i can do facetime between the three, using the same appleID ?
    thanks

    I found this discussion because I need to create dozens of Apple IDs for the faculty and staff of the school for which I'm the IT Director.
    This is weak.
    Apple, PLEASE upgrade the Apple ID system so it represents the current needs and paradigm.
    What am I thinking, Apple (like Google) don't follow user discussion forums, except by accident when an employee sees something and is motivated enough to carry the water for users in need.

  • Help needed in creating a multiple surface graph.

    Dear all,
    Thank you for taking the time to read my question.
    I have an equation with 3 variables.
    I have managed to plot 2 variable(and the result of the equation) on a 3d surface plot and now I am trying to plot the third one as multiple surfaces.
    More in detail, I am trying to plot the induced current in a coil of turns R, at a distance x from a High Voltage(High Current) conductor.
    You will see from my attached file that I have plotted 'Induced current', 'Radius from point x' and 'HV conductor Current'.
    I now wish to plot turns N (say 50, 100, 150, 200, 250 turns) as 5 multiple plots (one on top of the other).
    How can I do this, as I have checked the example files and have not found something very relevant on that. Also answers to similar questions are not very clear to me.
    I am also not quite sure that the surface plot I have is correct, as the valus of HV conductor Current (I) do not start from 500. The same happens for Radius From Point 'x' (R), as they start from 3,5 instead of 3.
    If I go to to CDgraph3D>>properties, I can see 4 more plots but they are definetely not what I would expect.
    I am trying to plot:
    Radius from point 'x' (R)= 3, 3.5, 4,...,5
    HV Conductor Current I = 500,600,...,1000
    # turns of coil N= 50, 100,...,250 (as 5 surface plots)
    and last Induced Current
    What am I doing wrong in my code?
    Thanks
    Alex
    Attachments:
    Parametric analysis of induction coil.vi ‏35 KB

    Good Morning,
    With some mentoring from the skilled LabVIEW Zealot that resides a few cubicles away, I have found how to access the property nodes on the 3D plot. Please find attached a VI that programmatically sets the scale of interest to 600-700. You can change the code to fit your needs.
    Many, many more details can be found at :
    http://forums.ni.com/ni/board/message?board.id=170&message.id=143663&requireLogin=False
    ( the VI should be in 8.0 this time.   )
    Regards,
    Mello
    Data Science Automation
    CTA, CLA, CPI
    SHAZAM!
    Attachments:
    Parametric%20analysis%20of%20induction%20coil[1][1].vi ‏39 KB

Maybe you are looking for