I want to replace code between 2 comments on many files Just can't figure out to do it.

There is code between 2 comments I want to replace. For example <!-- #header --> CODE <!-- #/header -->
The problem is that there is some discrepancy in the code in each and every file. Its a header I wanted to change on a html website I thought the best way would to to use the replace function
But each file is a little different in the code. So Its just not working. All the code between these two comments have to be changed to the same block of code.
I tried using regular expression I just can't understand it.
I tried you /w /W but it just wont work.
Why is there not simpler option. Like <!-- #header --> * <!-- #/header --> and it replaces everything in between The help file should have atleast given an example of various possibilities.

((\s|.)*?)
(...) - Locigal grouping of the expression
  \s  - Matches any white-space character
  |   - Logical OR
  .   - Any character (except \n newline)
  *   - Match at least 1
  ?   - Forces minimal matching
See this cheat sheet http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/

Similar Messages

  • A while back I made a gamecenter account that was not associated with an Apple ID, it was with my email, now my gamecenter account IS my Apple ID. I want to delete it and make a new one, but i can't figure out how. Help!

    A while back I made a gamecenter account that was not associated with an Apple ID, it was with my email, now my gamecenter account IS my Apple ID. I want to delete it and make a new one, but i can't figure out how. Help!

    Since you can't delete Apple IDs and having multiple Apple IDs can cause confusion, what you may want to do is rename your existing Apple ID to the new email (desired Apple ID).  That would in effect do what you want, get rid of the old and give you the new.
    See "Apple ID: Changing your Apple ID"
    ivan

  • Help, I just can't figure out this code or what to do to make it work

    ok, what i'm trying to do is the following: I created a class called Enrollement, in that class I put in an array of 30 objects to hold the places of 30 names that I used Scanner to bring in from a text file. Ok, that part of the code alone works fine. After that, I know want to write a function that will count the number of times each letter (a-z) appears in the first and last names in the class that are held in that array. I have been working on this for a while making changes doing a bunch of stuff but i keep getting errors with the second part that I honestly don't know how to fix or what i'm doing wrong. I am very new to Java. IF/when anyone responds, please dumb down your answers as much as possible so that I can understand what you are saying, I just have no idea what the errors mean or how to make this program work. my code is below:
    import java.util.Scanner;
       import java.io.File;
        class Enrollment{
           public static void main(String [] args)throws Exception{
             Person [] name = new Person [30];
             Scanner sc = new Scanner(new File("names.txt"));
             while (sc.hasNext()){
                String lastName = sc.next();
                String firstName = sc.next();
                sc.nextLine();
                System.out.println("Name: " + firstName + " " + lastName.substring(0,lastName.length()-1));
           public int chararcterCount(char c){
             int count = 0;
             for(int i = 0;i<30;i++){
                Person p = Person ;
    count = count + p.charCount(c);
    return count;
    public static void main(String [] args)throws Exception{
    Enrollment e = new Enrollment();
    e.print();
    System.out.println("Letter a appears " + e.characterCount('a') + times);
    keeps telling me that public static void main.... is already defined and i know that but once i delete that part from program i just keep getting more errors later and i just have no clue how to make this all work

    the program is supposed to count the number of times
    a certain letter appears in the first and last names
    of the class.I was asking about the particular code snippet you posted, not about the program.
    ....p.charCount is supposed to count the
    number of times that character appears, or at least
    that's what i want it to do, Does it do that? Did you test it? You should write a main method that just constructs a Person object and then call its charcount method for vairous characters--one that appears zero times, one time, and multiple times--and see if you get the right results.
    i'm not too sure of the
    rules aorund here and i don't know if this is taboo,
    but would it be possible tot talk to you in real time
    on AOL Instant Messenger or somethingNo, most people here (myself included) will not do that. It denies others the chance to learn from your problem, and prevents others who might help you from participating in the conversation.

  • We want to transfer the music library on our Mac to a second ipad without transfering any other data.  we share an itunes account and I just can't figure out how to get the music onto the new pad

    Hello friends
    We are trying to move our music library stored on the Mac to a second ipad.  We have already set up the second ipad and are only interested in getting select music onto the second ipad.  When we plug the ipad into the imac and connect to iturnes it wants to set up or restore the second ipad.  We're afraid if we do this it will remove all current information on the second ipad.  Thanks

    Did you ever resolve the iCloud problem.I am in the same position and its driving me mad!!! If you have a link to an solution I would appreciate it.

  • How do I rent a movie using money in my iTunes account.  I had to enter at the iTunes gift card code to open the account, but now I can't figure out how to use this money to rent a movie; I opened the account several months ago but never used the money.

    How do I rent a move using moneyin my iTunes account.  I had to enter the iTunes gift ard code to open the account several months ago, but never purchased anything with it.  When I entered this code to rent a movie, the response was that it was redeemed.  What am I doing wrong?

    If you've already redeemed the card onto your account then its amount should be on your account - a card can only be redeemed once.
    To rent a film, find the film in the store and (if the film studio has made it available as a rental in your country) click on its Rent button. If you are beig prompted to review your account and enter credit card details then see if this post from mountaingoatgirl lets you do so without entering card details : https://discussions.apple.com/message/24303054 . If that doesn't work then you should be able to remove your card's details after entering them.
    As long as you account's balance covers the rental cost then only that should be charged. How purchases are billed : http://support.apple.com/kb/HT5582
    When making purchases, content credits are used first, followed by Gift Certificate, iTunes Card, or Allowance Account credits; your credit card or PayPal account is then charged for any remaining balance.

  • I want to put my photo on my iMessages profile, and I can't figure out how to do it, please help?

    iMessages profile, how do I add a photo to my account on my mini ipad?

    Ok so I go to contacts, find me, add a photo, click on finish, and go to my iMessages or the green icon on my desktop that says Messages, post a message to my friends and all they see is an avatar (or whatever you call it) with my initials on it. 

  • Can't figure out what is the code

    Hi
    I got following macro that will help me to run certain transaction.
    I just can't figure out where comments ends and where code starts so I was unable to run it for like 3 hours now.
    In other words
    I am trying to use Excel Macro that will get to active transaction in SAP and do waht I have recorded.
    'SAPGUI Macro for updating SAP from Excel data 'Prerequisites: '1. Script Recording and Playback from the SAPGui must be enabled by admin '2. The Excel list must be set up from top left corner of a worksheet '3. The worksheet with data must be the active sheet '4. There is no error handling. Build it yourself! '5. The script will update the active (current) SAP transaction'Instructions for use 'Record a macro of your update actions. 'Paste the session.findById stuff between the <== and ==> markers'Edit the literal values and replace with Trim(CStr(objSheet.Cells(x, y).Value)) 'where x and y are the row and column counters'Open up your Excel sheet with data (row 1 is ignored here) 'Fire the macro! '===========BEGIN BOILERPLATE=================== REMSet up connection to the SAP screen: If Not IsObject(application) Then Set SapGuiAuto = GetObject("SAPGUI") Set application = SapGuiAuto.GetScriptingEngine End If If Not IsObject(connection) Then Set connection = application.Children(0) End If If Not IsObject(session) Then Setsession = connection.Children(0) End If If IsObject(WScript) Then WScript.ConnectObject session, "on" WScript.ConnectObject application, "on" End If REMSet up connection to the Excel data to be keyed into SAP: Dim objExcel Dim objSheet, intRow, i Set objExcel = GetObject(,"Excel.Application") Set objSheet = objExcel.ActiveWorkbook.ActiveSheet session.findById("wnd[0]").maximize
    '===========END BOILERPLATE=====================
    'REM Example: Mark material for deletion in Plant using MM06 For i = 2 to objSheet.UsedRange.Rows.Count     'Assuming there is a header rowREM Find a cell and put its value in: REM Note: The section of the Script shown below can be recorded ' and edited to pick data from the Excel sheetstrCN = Trim(CStr(objSheet.Cells(i, 1).Value)) strWerks = Trim(CStr(objSheet.Cells(i, 2).Value)) '<== session.findById("wnd[0]/usr/ctxtRM03G-MATNR").text = strCN session.findById("wnd[0]/usr/ctxtRM03G-WERKS").text = strWerks session.findById("wnd[0]/tbar[0]/btn[0]").press session.findById("wnd[0]/usr/chkRM03G-LVOMA").selected = false session.findById("wnd[0]/usr/chkRM03G-LVOWK").selected = truesession.findById("wnd[0]/tbar[0]/btn[11]").press 'session.findById("wnd[0]/tbar[0]/btn[0]").press '==> Next

    Ok macro works and triggers actions from recorder. I was doing it with hope I will select data in SAP and paste in Excel AND/OR export file from SAP with data.
    If I record select column and then copy it. Script is recorded until selection . It ignores copy (i tried use mouse right click and copy AND manual alt+F12 and then copy from context menu)
    When I export recorder does open export window but does not writes the line relevant to clicking save.
    I found such bits
      'Choose the export format
      session.findById("wnd[1]/usr/subSUBSCREEN_STEPLOOP:SAPLSPO5:0150/sub:SAPLSPO5:0150/radSPOPLI-SELFLAG[1,0]").select
      session.findById("wnd[1]/tbar[0]/btn[0]").press
    'Choose the export filename
      session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = "test.txt"
      session.findById("wnd[1]/usr/ctxtDY_PATH").text = "C:\Temp\"
    'Export the file
      session.findById("wnd[1]/tbar[0]/btn[0]").press
    But they dont seem to be relevant to my previous macro.
    Any quick fix to get data out of Excel

  • My ipod broke n the store were i buy it dont want to replaced n i have a 1 year guaranty what can i do?

    my ipod broke n the store were i buy it dont want to replaced n i have a 1 year guaranty what can i do?

    What is your malfunction? If you state the problem someone may have an answer on have to correct it. Note: the warranty covers defective craftsmanship with your iPod, not miss use, example-- dropping your iPod and cracking the screen, generally not covered, unless you purchased Apple Care. Your mother board has a melt down and fails within 1 year, most likely covered. (This is only an example Apple has the final say what is or is not covered, only using this to make a point). Not knowing the details of your trouble, contact Apple Genius Bar to have your iPod evaluated. Good luck, Cheers.

  • I can't figure out what's wrong with this code

    First i want this program to allow me to enter a number with the EasyReader class and depending on the number entered it will show that specific line of this peom:
    One two buckle your shoe
    Three four shut the door
    Five six pick up sticks
    Seven eight lay them straight
    Nine ten this is the end.
    The error message i got was an illegal start of expression. I can't figure out why it is giving me this error because i have if (n = 1) || (n = 2) statements. My code is:
    public class PoemSeventeen
    public static void main(String[] args)
    EasyReader console = new EasyReader();
    System.out.println("Enter a number for the poem (0 to quit): ");
    int n = console.readInt();
    if (n = 1) || (n = 2)
    System.out.println("One, two, buckle your shoe");
    else if (n = 3) || (n = 4)
    System.out.println("Three, four, shut the door");
    else if (n = 5) || (n = 6)
    System.out.println("Five, six, pick up sticks");
    else if (n = 7) || (n = 8)
    System.out.println("Seven, eight, lay them straight");
    else if (n = 9) || (n = 10)
    System.out.println("Nine, ten, this is the end");
    else if (n = 0)
    System.out.println("You may exit now");
    else
    System.out.println("Put in a number between 0 and 10");
    I messed around with a few other thing because i had some weird errors before but now i have narrowed it down to just this 1 error.
    The EasyReader class code:
    // package com.skylit.io;
    import java.io.*;
    * @author Gary Litvin
    * @version 1.2, 5/30/02
    * Written as part of
    * <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    * (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    * and
    * <i>Java Methods AB: Data Structures</i>
    * (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    * EasyReader provides simple methods for reading the console and
    * for opening and reading text files. All exceptions are handled
    * inside the class and are hidden from the user.
    * <xmp>
    * Example:
    * =======
    * EasyReader console = new EasyReader();
    * System.out.print("Enter input file name: ");
    * String fileName = console.readLine();
    * EasyReader inFile = new EasyReader(fileName);
    * if (inFile.bad())
    * System.err.println("Can't open " + fileName);
    * System.exit(1);
    * String firstLine = inFile.readLine();
    * if (!inFile.eof()) // or: if (firstLine != null)
    * System.out.println("The first line is : " + firstLine);
    * System.out.print("Enter the maximum number of integers to read: ");
    * int maxCount = console.readInt();
    * int k, count = 0;
    * while (count < maxCount && !inFile.eof())
    * k = inFile.readInt();
    * if (!inFile.eof())
    * // process or store this number
    * count++;
    * inFile.close(); // optional
    * System.out.println(count + " numbers read");
    * </xmp>
    public class EasyReader
    protected String myFileName;
    protected BufferedReader myInFile;
    protected int myErrorFlags = 0;
    protected static final int OPENERROR = 0x0001;
    protected static final int CLOSEERROR = 0x0002;
    protected static final int READERROR = 0x0004;
    protected static final int EOF = 0x0100;
    * Constructor. Prepares console (System.in) for reading
    public EasyReader()
    myFileName = null;
    myErrorFlags = 0;
    myInFile = new BufferedReader(
    new InputStreamReader(System.in), 128);
    * Constructor. opens a file for reading
    * @param fileName the name or pathname of the file
    public EasyReader(String fileName)
    myFileName = fileName;
    myErrorFlags = 0;
    try
    myInFile = new BufferedReader(new FileReader(fileName), 1024);
    catch (FileNotFoundException e)
    myErrorFlags |= OPENERROR;
    myFileName = null;
    * Closes the file
    public void close()
    if (myFileName == null)
    return;
    try
    myInFile.close();
    catch (IOException e)
    System.err.println("Error closing " + myFileName + "\n");
    myErrorFlags |= CLOSEERROR;
    * Checks the status of the file
    * @return true if en error occurred opening or reading the file,
    * false otherwise
    public boolean bad()
    return myErrorFlags != 0;
    * Checks the EOF status of the file
    * @return true if EOF was encountered in the previous read
    * operation, false otherwise
    public boolean eof()
    return (myErrorFlags & EOF) != 0;
    private boolean ready() throws IOException
    return myFileName == null || myInFile.ready();
    * Reads the next character from a file (any character including
    * a space or a newline character).
    * @return character read or <code>null</code> character
    * (Unicode 0) if trying to read beyond the EOF
    public char readChar()
    char ch = '\u0000';
    try
    if (ready())
    ch = (char)myInFile.read();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (ch == '\u0000')
    myErrorFlags |= EOF;
    return ch;
    * Reads from the current position in the file up to and including
    * the next newline character. The newline character is thrown away
    * @return the read string (excluding the newline character) or
    * null if trying to read beyond the EOF
    public String readLine()
    String s = null;
    try
    s = myInFile.readLine();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (s == null)
    myErrorFlags |= EOF;
    return s;
    * Skips whitespace and reads the next word (a string of consecutive
    * non-whitespace characters (up to but excluding the next space,
    * newline, etc.)
    * @return the read string or null if trying to read beyond the EOF
    public String readWord()
    StringBuffer buffer = new StringBuffer(128);
    char ch = ' ';
    int count = 0;
    String s = null;
    try
    while (ready() && Character.isWhitespace(ch))
    ch = (char)myInFile.read();
    while (ready() && !Character.isWhitespace(ch))
    count++;
    buffer.append(ch);
    myInFile.mark(1);
    ch = (char)myInFile.read();
    if (count > 0)
    myInFile.reset();
    s = buffer.toString();
    else
    myErrorFlags |= EOF;
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    return s;
    * Reads the next integer (without validating its format)
    * @return the integer read or 0 if trying to read beyond the EOF
    public int readInt()
    String s = readWord();
    if (s != null)
    return Integer.parseInt(s);
    else
    return 0;
    * Reads the next double (without validating its format)
    * @return the number read or 0 if trying to read beyond the EOF
    public double readDouble()
    String s = readWord();
    if (s != null)
    return Double.parseDouble(s);
    // in Java 1, use: return Double.valueOf(s).doubleValue();
    else
    return 0.0;
    Can anybody please tell me what's wrong with this code? Thanks

    String[] message = {
        "One, two, buckle your shoe",
        "One, two, buckle your shoe",
        "Three, four, shut the door",
        "Three, four, shut the door",
        "Five, six, pick up sticks",
        "Five, six, pick up sticks",
        "Seven, eight, lay them straight",
        "Seven, eight, lay them straight",
        "Nine, ten, this is the end",
        "Nine, ten, this is the end"
    if(n>0)
        System.out.println(message[n]);
    else
        System.exit(0);

  • Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailier like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    OT

  • HT6154 Can someone please just help me figure out how to update this stupid phone without losing anything? I somehow have more than one Apple ID on this,but I just want my music and my pictures to stay and I'm terrified of losing these things.

    Can someone please just help me figure out how to update this stupid phone(iPhone 4)without losing anything? I somehow have more than one Apple ID on this,but I just want my music and my pictures to stay and I'm terrified of losing these things. I have a lot of music from old CDs on here,and for some reason I can't even transfer them manually onto my computer. I'm not tech savvy whatsoever. Someone please help,having my music is the the whole reason I still have this phone.

    First read about back http://support.apple.com/kb/ht1766
    Then  read on how to transfer photos to your computer http://support.apple.com/kb/ts3195
    Then
    UPDATING iOS
    Over the air updating of iOS needs iOS 5 or later so unless you have iOS 5 or later you will not see updating in setting
    The following link explains how to update http://support.apple.com/kb/HT4972
    This link explains how to update using wireless http://support.apple.com/kb/HT4623
    This explains how to transfer purchases to your computer http://support.apple.com/kb/ht1848

  • I can't figure out how to log off of my daughter's iTunes account that has been loaded to my PC.  When I want to sync my iPhone, I get her data, not mine.

    I can't figure out how to log off of my daughter's iTunes account that has been loaded to my PC.  When I want to sync my iPhone, I get her data, not mine.

    Hi, Abril_Perez17.
    This may be related to a new feature embedded in iOS7 that shows all purchased music by default.  Go to Settings > Music, then turn off Show All Music.  See if the issue ceases once the feature has been disabled.  This information is located on page 63 of the user guide below. 
    iPhone User Guide
    Regards,
    Jason H. 

  • I just upgraded to mountain lion and I can't figure out how to use messages...  it wants me to use AIM or something like it, but I can't change the user...

    I just upgraded to mountain lion and I can't figure out how to use messages...  it wants me to use AIM or something like it, but I can't change the user... How do I do this??

    See this Thread

  • How to remove stocks, weather,clock, notes, reminders, youtube, game center calc, voice memos,calendar, maps, and stocks? As a person who blew 300 bucks I think I should have a choice if I want to remove this crap but can't figure out how.

    How to remove stocks, weather,clock, notes, reminders, youtube, game center calc, voice memos,calendar, maps, and stocks? As a person who blew 300 bucks I think I should have a choice if I want to remove this crap but can't figure out how.
    any help would make me happy. As it stands now from looking on the web it can't be deleted but making sure before i return this ipod touch. I wan't a clean item the way I wan't it and not how they want it. Like I do not need Itunes and App Store on this ipod because I use my computer only to shop, So many things i like out of the ipod and I am sure lots more people also would like a cleaner ipod/phone or what ever.
    from looking at what I never use I see a total of 14 app's I not want taking up space and my screen.
    yup with the 5.0 came another stupid icon i not like. ( Newsstand )

    yes i moved them into a folder, but I not want them at all on my screen. Guess I return this and pick up a
    Zune HD
    less app's on that then ipod touch. thank you for the responce.

  • Have been using Foxfire for AMcG website. Now want to edit MME website. Can't figure out how to bring up second website. Whatever I do, it keeps taking me ba

    Have been using Foxfire for AMcG website. Now want to edit MME website. Can't figure out how to bring up second website. Whatever I do, it keeps taking me back to the original AMcG site.
    Because I'm unable to figure out where to find the answer to this question on this website, would you mind emailing it to <sub>removed by a moderator -j99</sub>. Much obliged, for I'm working on a tight deadline and have no one else to turn to, being it's Sunday.
    Please note this is a publicly available and web search indexed forum that the message appears on https://support.mozilla.org/en-US/questions/950640 you probably do not wish your email address to appear. Note it is possible to use the private messaging ssytem without disclosing your email address
    [https://support.mozilla.org/en-US/messages/new?to=John99 me] [https://support.mozilla.org/en-US/messages/new?to=annmcgill you]

    Sorry I not sure I understand what you are trying to do and what the problem is, are you able to give more details please.
    Are you trying to upload to a site you own ?

Maybe you are looking for

  • Proof of Product Registration

    I'm trying to purchase Safeware insurance for my macbook. I called them up and they said all I needed is proof of product registration for my macbook. This macbook was a gift so I do not have the original receipt. I asked if I could simply print out

  • Document store access caused errors in the SAP Correction System

    Hi Gurus, I have this user who is trying to make changes to a workbook in DEV which is published to a folder with some users who are assigned to role. This user is the only user with Developer 2 role. When the user make changes and try to save the wo

  • JMS in cluster - why is it assymetric?

    We use 8.1 in a 2 noded cluster/+1 adminserver/.           On each node, there is a JMS server on migratable target. Lets say 'test1' and 'test2'.           A distributed queue has 2 destination , one on the each node. The JNDI name of the queue is '

  • Hire Date + 6 months - loop

    What is the best way to handle the following: I have a 'date of hire' and I need to find the anniversary date of the next performance review.  A performance review is held every 6 months.    How do you handle this for employees that were hired someti

  • Currency Conversion happend Record wise or on Aggregated Level

    Hi , Suppose we've currency converison applied on 0CALMONTH. And suppose we've 5 records for a CALMONTH december. In the Report, we do not ahve Document No as part of rows, so in that case data for a CALMONTH will be aggregated. So, in that case, whe