RegExp for massive copy/paste operation

I run a books site with ~3,500 HTML pages on it. At the
bottom of each page, in the main div, where the text goes, is a
navigation link, for previous, next, and contents. As it's annoying
for users to scroll to the bottom of the screen to navigate, I need
to copy the nav link on each page and paste it up at the top of the
div as well. There has to be a way to do this, possibly with a Perl
script, but I have no idea how.
At the risk of becoming a code mooch, can someone tell me how
to do this? I figure some sort of RegExp operation might do it. I
never use the Search and Replace in DW, relying instead on my
trusty text editor, but I'm guessing that would be involved
somehow.
Hope all are well.

MellowCricket wrote:
> I run a books site with ~3,500 HTML pages on it. At the
bottom of each page, in
> the main div, where the text goes, is a navigation link,
for previous, next,
> and contents. As it's annoying for users to scroll to
the bottom of the screen
> to navigate, I need to copy the nav link on each page
and paste it up at the
> top of the div as well. There has to be a way to do
this, possibly with a Perl
> script, but I have no idea how.
>
> At the risk of becoming a code mooch, can someone tell
me how to do this? I
> figure some sort of RegExp operation might do it. I
never use the Search and
> Replace in DW, relying instead on my trusty text editor,
but I'm guessing that
> would be involved somehow.
>
> Hope all are well.
>
We would need an example of the navigation link and which
parts of it
change. The task is trivial with F & R.
Mick.

Similar Messages

  • Undo/Redo for Cut, Copy, Paste

    I am trying to implement Undo/Redo for Cut,Copy,Paste in a Treetable.
    I have to support undo/redo for multiple nodes being cut/copied. I am not sure how I should be going about implementing this. Any help will be greatly appreciated.
    Thanks

    If the class you are using doesn't support cut, copy, and paste already, usually what you do is store a list of actions in two lists. One for actions done, the other for redos (when there is an undo). Capture the data before and after each operation (you can create a KeyListener to listen for the events) and store that in a list. When undo is called, the last element on the list should be undone, either by taking it out of the list and reiterating through the elements still there, or implementing an undo method in the object you are trying to change. Then put that element on the redo list in case that is called. This works well with graphics and stuff, but I never tried to implement it in a tree with nodes and stuff, so that's about the most I can help with right now. I hope it helps some!
    -JBoeing

  • Copy / paste operations crash all SGD windows

    Hi
    From time to time, users have problems during copy/paste operations between SGD windows.
    When users use this function between (for ex.) gterm and x-emacs v2.22 windows, all SGD windows crash.
    The support asked them to migrate to the new SGD version (at this time 4.41) but this problem still appears.
    We configured the coreadm with all options enable but it seems we don't have any generated core files.
    Does anyone already got this problem ?
    Thank's for your answers !
    Edited by: furtherup on Mar 26, 2009 12:47 AM

    I'm having the same problem. I don't use ZoneAlarm or Avira.
    I just use the built-in Windows Defender in Windows 8.
    My problem started in v22 and I still have it in v23.
    I've tried all the suggestions posted at various websites, but I still can't copy and paste in Firefox.
    Any ideas?

  • AbstractTableModel.isCellEditable() vs. copy/paste operations

    Say I have a JTable with 2 columns (strings), the 1st with a default cell renderer, and the 2nd one with a renderer extended from JPasswordField. So far so good. But I don't want the 1st column to be editable. So I modify the model to return false for isCellEditable(r,c) for that column.
    What I am finding is that making a cell non-editable also renders it immune to copy/paste operations. I want to be able to select/copy the non-editable cell and value, and paste it into the 2nd column (via Ctrl-c/Ctrl-v). The copy operation only appears to work if isCellEditable() is true. ..
    I fooled around with a TableCellEditor to try to make an "editable" cell that would allow selection/copy without actually allowing a value change, but couldn't get it to work.
    What am I missing?

    Something like this should work
    Label l = new Label (...);
    l.addKeyListener (new KeyAdapter() {
    public void keyTyped (KeyEvent ke) {
    if (ke.getModifiers()&KeyEvent.CTRL_DOWN_MASK!=0) {
    if (ke.getKeyChar()=='c') ...

  • Error "Compile error: Invalid character" after copy paste operations in VBE 6.5 PowerPoint 2011

    This is a weird problem with the VBE 6.5 in Office 2011, running natively on a Mac.
    Sometimes, yet often, when I select a word by double clicking on it or a line by highlighting that line in the editor and then copy/paste it somewhere else in the code, the compiler throws the error "Compile error: Invalid character"
    The thing is, what I see has been pasted is exactly the same as the source text. However, if I then paste the same clipboard item to a text editor, I can see that there is an 'invisible' character at the end of the string which is counted in the text editor
    where the cursor is shifted past it but does not shown on the screen!!!
    Back in the VBE, if I select a line that is dubious and drag it, the semi transparent dragged text has a '>' character on a new line.
    In some copy/paste cases, the compiler doesn't see an error but the code doesn't work as expected and I have spent hours debugging stuff that has invisible characters in it (the hardest debugging I've ever had to do!).
    I'm not sure if this example will paste correctly into the forum but this looks like 19 characters but is in fact 20 as there is the offending copy/paste invisible character between 'Test' and '.'
    <code>Test.Value = False</code>
    This seems to be a major oversight in the code of the VBE 6.5 so are Microsoft aware of this and when is it due to be fixed?
    Jamie.

    I had this exact issue.  This is a terrible bug.  The code looks perfect, but there are hidden characters that throw compiler errors.  Thanks for the quick fix, Microsoft.

  • Assign another shotcut for cut/copy/paste? (I'm using Awsome WM)

    I'm using awesome wm, and the shortcut keys for copying/pasting works perfectly. but I need them to work when I change my keyboard layout. It's normal that they don't work, since when the layout is "ir" ctrl + c becomes ctrl + ز. is there anyway to make this shortcut to do the copying too?

    You might want to try the move tool instead of the hand tool the hand tool is a navigation tool it will allow you to move the document about but not and layers or art for that you need to use the move tool it is at the top of the tool panel
    You are jut having a new house moment.
    You'll back in the groove soon.

  • Cut,copy,paste operations in applet in LINUX

    Hai friends,
    I implemented cut copy operations in applet for windows. But it is not operable in Linux.Can any one resolve this problem.
    regards,
    srinivas

    [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html#howto]How to Remove Key Bindings

  • How to observe Copy&Paste ?( not just AddToHierarchy)

    Hello!
    I need to observe Copy&Paste event.
    The approach with Doc Observer attached ( protocol IID_IHIERARCHY_DOCUMENT) gives me ability to catch
    theChange = kNewPageItemCmdBoss and AddToHierarchyCmdBoss.
    My problem is that this events occur also on another use cases then Copy&Paste ( for example - just create Frame).
    But i need to perform some custom action ONLY if Copy&Paste ( of Frames) occur.
    ( actually, i need Paste event )
    How can i do this ?
    Any help will be appreciated.
    Thanks.

    No, there isn't any way to hook these events.
    And even if you could, would it be for ALL copy/paste operations, only for some, for certainly data types?   I would recommend that you look at simply hooking the standard OS clipboard/scrap operations.

  • How to hook copy/paste events?

    I'm trying to have copy/paste (and maybe cut) trigger a method that I have written. I have looked into it and so far I have not found an easy way (such as with open/close/save events).
    I saw some stuff involving AVDocSelectionPasteProc and AVDocSelectionCopyProc but it looks like I would need to create a selection server and then register these with that. I'm not quite sure how to go about doing that. I don't want to replace what happens during copy/paste events, just have them trigger a message to be sent out. Is there an easier way of doing this, or how should I go about doing it?
    Thanks

    No, there isn't any way to hook these events.
    And even if you could, would it be for ALL copy/paste operations, only for some, for certainly data types?   I would recommend that you look at simply hooking the standard OS clipboard/scrap operations.

  • Urgently Need Code for Copy & Paste from Html Table in JSP to Excel file

    I am creating a html table in JSP file .
    I need code for 'Cut,Copy,Paste' functions ie. if someone wants to copy data from my table to excel file or from excel file to html table he shud be able to do that.
    Can someone give me code for 'Cut,Copy and Paste' i.e. some javascript functions which can do cut, copy and paste which i can put in my jsp file
    Thanks
    Message was edited by:
    javatechguru2007

    package com.chinmayananda
    public class Tetris{
    // complete here
    code]
    public abstract class AbstractTetris {
       public abstract void start();
       public abstract void stop();
    }nearly done

  • Update pages in form by import then copy/paste

    I have inherited a dynamic interactive PDF. Essentially what they did was take multiple pdfs and put them in one, visually shown below.
    form1.pdf, 1 page-----
    |
    form2.pdf, 2 pages----
    |---------> formall.pdf
    form3.pdf, 4 pages----
    |
    form4.pdf, 3 pages----
    |
    etc...----------------
    Well now they have made massive changes to form2.pdf and form4.pdf and I am supposed to update formall.pdf.
    Is there any way to pull NewForm2.pdf into the existing formall.pdf, and then copy/paste the fields from the current form2 in formall.pdf onto the new one, then delete the old form2 pages?
    The changes in NewForm2 are extensive and it would take quite a while to just redo form2 inside formall.
    I do not think they thought about updates when they created formall.pdf. I would like to separate the forms and use something like Forms Server, or even add each form into a library where I could add the new version and create a new formall, but I do not have time.
    The only tools I have are LiveCycle Designer 7 and Adobe Reader 7.05. I do NOT have Acrobat.
    I have seen several posts about inserting pdfs from Designer into Acrobat to update, but not inserting pdfs into Designer to update.
    I tried importing NewForm2.pdf into Designer with formall.pdf already open, but it always creates a completely new form.
    Thanks

    I exported a PDF from Pages v5.2.2. This uses Apple's Quartz PDFContext, not Quark.
    In Windows 7, I opened this PDF with Adobe Acrobat Reader v11.0.09. I then copied/pasted a paragraph of this PDF content into LibreOffice Writer (v4.3.2.2). Since there was Baskerville in Windows 7, this comment pasted correctly including font-size. I did not have to make any adjustments to LO to accept this text.
    On Ubuntu Linux 14.04, with the latest updates, I opened the same PDF in Evince, the default PDF viewer. Adobe does not offer an Acrobat Reader download for Linux. Again, I copied and pasted a paragraph of content from the PDF viewer into LibreOffice Writer. As there was no Baskerville installed, Writer defaulted to the Liberation font, at the correct point size.
    In either of these platform scenarios, there were no anomalies with sentence/paragraph newlines .vs. carriage return issues from the PDF document during copy/paste operations. These were default control-v pastes that did not use the Paste Special menu item in LibreOffice.

  • CR duplication when Copy/Pasting text from a JTextArea

    I have a typical scenario of having text in a JTextArea. When I select some of that text and try to paste it either to an external text editor or even in the same JTextArea, I am getting extra line spaces in the screen.
    For example, if I have the following text:
    <a id=1>
       <b/>
    </a>When I copy paste it, I get:
    <a id=1>
       <b/>
    </a>When I looked to see what characters were being used for the CR, I see "\r\n". This is the standard line.seperator for Windows OS which is fine. When I save this text to a file using the Java I/O libraries, it is fine (no extra lines). But when copy/pasting it prints extra lines.
    Has anyone had similar problems?

    Has anyone had similar problems? No. How are you doing the copy/paste? Did you write your own routines or are you using the default Actions. By default, when a Document is loaded it will convert the "\r\n" end of line string to "\n" and store the single character in the Document. When you use the getText(..) method the enod of line string will be expanded to "\r\n" on a Windows system, but this should not happen in a copy/paste operation. How do you add data to your text area?
    This section from the Swing tutorial on "Text Component Features" has a working example of using copy/paste:
    http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html

  • CTRL + C, CTRL + V - copy paste

    Hi,
    I created one menu ... in that for copy & paste i given short as CTRL+V , CTRL + C. But the problem is when i do CTRL+C CTRL+V systems defaults copy paste executing how can i sove this.
    Thanks in advance
    JOe

    I had also done some program in menu.I also experienced the same problem.For some other operations like "to open a file we use to give Alt+F,as mnemonic key " we have to write the coding for that ,but for cut,copy,paste,i.e., Ctrl+C,Ctrl+V,Ctrl+X it is default.U dont want to write coding for that.

  • Copy-paste hotkeys in F2B3 Design View

    Problem:
    At this moment only [Ctrl+Insert] and [Shift+Insert] hotkeys
    (shortcuts) can be used for copying and pasting components in
    Design View of Flex 2 Beta 3. But in Code View [Ctrl+C] and
    [Ctrl+V] hotkeys can be used for copy-paste operations too.
    Suggestion:
    It would be more convenient to use [Ctrl+C] and [Ctrl+V]
    hotkeys for copy-pasting Design View of Flex 2 Beta 3 too because:
    They're used in Code View already;
    They more familiar for many users.
    Solution:
    Add [Ctrl+V] and [Ctrl+C] to default hotkeys for copy-pasting
    in Design View of Flex 2 Beta 3.

    "<body leftmargin="float">"
    Can you say what that's doing? "float" is not a legal value for the leftmargin style, which requires an integer value.  But its use is deprecated in favor of CSS anyhow.
    Your pasted code is lacking a doctype or anything that would normally be above that stylesheet link.  Is that just an oversight or is it really not there?

  • Some general ?'s re: urxvt, copy/paste, etc.

    I started using urxvt, and I just checked the manpage and what I believe is the section on keybindings was quite confusing for me. I am used to gnome-terminal's ctrl+alt+c/v for copy/paste, and just want to double check a few things.
    1. In urxvt, highlight with either left/right mouse and which kb button/shortcut will copy? And what is the paste command in urxvt (above gnome-terminal combo doesn't work I just realized).
    2. Doing it this way, I can only paste with middle mouse button, ctrl+v in FF for example doesn't paste it, and I am confused about why?
    3. Can someone give me a fairly basic command/rundown for configuring/viewing keybindings in urxvt? I have checked the manpage like I said and it was a bit baffling.
    Thanks folks I really want to learn it, appreciate any help to get me in the right direction with some basics

    colbert wrote:Is it just separate clipboards and that's how it is?
    Yes. As a matter of fact, clipboard managers such as Glipper allow for collection of copied items based on whether the items come from the Primary selection (highlight & middleclick) or the Clipboard (CTL+C & CTL+V, etc.).
    See my post here:
    http://bbs.archlinux.org/viewtopic.php? … 26#p279226
    (especially the link at the bottom) for more detailed info about the copy and paste implementation in X11.
    By the way, I recently began using rxvt-unicode, and two things that I find require some adjustment are the use of the Primary selection for copy / paste (without the option for using the Clipboard) and no drag and drop support.
    Because of urxvt's use of the Primary clipboard, I had to enable that feature in Glipper (which I normally have disabled), and it certainly leads to a lot of junk filling up Glipper's copy / paste list. Every time you highlight something whether you intended to copy and paste it or not, the item ends up in the list making it more difficult to cull out the items you really intended to re-use for copy & paste operations.
    I guess everything has its pros and cons, and I'm still on the fence about whether the pros of urxvt outweigh the cons. I'm leaning towards keeping it for now.
    Edit: grammar
    Last edited by MrWeatherbee (2008-01-21 21:42:32)

Maybe you are looking for