On Thu, Nov 18, 2010 at 9:36 PM, Shakthi Kannan <[email protected]>wrote:

> Hi,
>
> --- On Thu, Nov 18, 2010 at 9:32 PM, Narendra Sisodiya
> <[email protected]> wrote:
> | I want to get all the character which is bounded by two strings.
> | for example...
> |
> | from a htmlpage, we can extract urls using all the text which is bounded
> by
> |
> | 1.     href="
> | and
> | 2     a space
> \--
>
>
My Bad !

        <span class="navbar">&gt; <a href="forumdisplay.php?f=327
<view-source:http://ubuntuforums.org/forumdisplay.php?f=327>">Main
Support Categories</a></span>

        <span class="navbar">&gt; <a href="forumdisplay.php?f=331
<view-source:http://ubuntuforums.org/forumdisplay.php?f=331>">General
Help</a></span>
        <td class="navbar" style="font-size:10pt; padding-top:1px"
colspan="3"><a href="/showthread.php?p=9948797
<view-source:http://ubuntuforums.org/showthread.php?p=9948797>"><img
class="inlineimg" src="images/misc/navbits_finallink_ltr.gif
<view-source:http://ubuntuforums.org/images/misc/navbits_finallink_ltr.gif>"
alt="Reload this Page" border="0" /></a> <strong><span
style="font-weight: bold; color: #980101;">[ubuntu]</span> help please
i can boot in to ubuntu 10.10 using a usb

For example if this is the case then the
First string will be     ->    href"
and second string will be a double quote ->    "
to extract all the hyperlinks

If suppose we have a log file where

456:3455 fft rohit :78
457:3445 fft mala :78
458:3455 fft shyam :78

if we want to extract all the names from this log file then the
first string will be *fft space*
and second string will be a *space*

So if I have a generic regular expression, that will help me a lot. I know
in the second case , this can be done using cut command but many times it
failed because of multiple space or another reasons.

So I am looking for a reg expression which search first string, as soon as
it match the first string , it start outputting the next string to
terminal/stdout until it reach the second string. then new line. This
process have to be repeated for whole document.


-- 
┌─────────────────────────┐
│    Narendra Sisodiya
│    http://narendrasisodiya.com
└─────────────────────────┘

-- 
l...@iitd - http://tinyurl.com/ycueutm

Reply via email to