regular expression required

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • koduruabhinav
    New Member
    • Sep 2010
    • 8

    #1

    regular expression required

    Hi,
    some simple code required.i was trying but i was unable.
    But i want instances to get printed each time like we are printing comparing instance name.

    suppose if we take
    Each X_RAMB18E1 module consists of different instances like i
    for the first time
    \U_eth_aggregat or_tb/eth_aggregator/core_0/client_side_FIF O1/rx_fifo_i/ramgen_u (
    for the second time
    \U_eth_aggregat or_tb/eth_aggregator/core_0/central_memory/Mram_txmemory8 (

    Now i want regular expression to find the code starting with

    \U_eth_aggregat or_tb/eth_aggregator/core_0/ and ending with opening bracket.

    and print the line.(here i want the extaracted string) like

    \U_eth_aggregat or_tb/eth_aggregator/core_0/client_side_FIF O1/rx_fifo_i/ramgen_u

    for each every cccurance of module the instance is different

    so i should use the same RE.but each insatance has same properties like starting with

    \U_eth_aggregat or_tb/eth_aggregator/core_0/ and ending with open bracket.

    and print the whole matching line

    in short iwant RE starting with \U_eth_aggregat or_tb/eth_aggregator/core_0/ and ending

    with bracket.all the code is in @codes1 . from codes1 i have to extract the instance with RE

    i have to find the occurance and print the insatance
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    I hate to say it but the way you posted this is very confusing and difficult to follow. Why not do this... post the line from the file, what in it you would like to match and what regex you have tried and we will help you get it correct.

    Regards,

    Jeff

    Comment

    Working...