Re: exclude atom from being matched (multiple letters)

Jim Hill <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <CAEE75_0KAWfH3L9XZJAS9O-6cGdF8qXaA+PCimEB=xMCjRQKHA@mail.gmail.com>
To handle patterns like that I sub in newlines or nulls and character-set
them:

  h;s/\. */\0/g
  /first[^\0]second/{d}
  g


On Thu, May 9, 2013 at 4:42 AM, Thierry Blanc <[email protected]> wrote:

>  well, the case was a html parsing, it was not end of line.
>
> here is the line where I wanted the do-not-match-dot-followed-by-spaces
> before the '<o:p>'
>
> s/.*<b style="mso-bidi-font-weight: normal.*>([^<>][^<>]*)*[HERE NO DOT
> FOLLOWED BY ZERO OR MORE SPACES]*<o:p>.*/\\subsection*{\1}/
>
> a not-the-following-atom syntax would be very handy ...
>
>
> here is the solution I eventually used:
>
> # subsection insert
> /<b style="mso-bidi-font-weight: normal/{
> /><o:p>/bsubsection
> /\. *<o:p>/bsubsection
> s/.*<b style="mso-bidi-font-weight:
> normal.*>([^<>][^<>]*)<o:p>.*/\\subsection*{\1}/
> }
> :subsection
>
>
>
> On 09/05/13 11:15, Jim Hill wrote:
>
> Yes - /\. *$/! { /^foo/ d; }
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
>
>
>


[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.