detect matches over more than one line of text

Results 1 to 2 of 2

Thread: detect matches over more than one line of text

  1. #1
    Join Date
    Dec 1969

    Default detect matches over more than one line of text

    hi,<BR> first, allow me to say I enjoy this site and use it a lot during my work.<BR><BR> I am trying to replace certain strings in a HTML file, I have the file read into a variable (string). Now, I want the pattern to be able to detect words within the file which are NOT inside tags (i.e. text the user sees), and are NOT links (not between &#060;a href&#062;blah&#060;/a&#062;) and all of this the be applicable one text made of more than one line... I manage to detect the string I want but I can&#039t manage to filter the sames ones that are inside a link nor those which are spreaded over more than one line.<BR><BR>After all these talking... can anyone help me? :o)<BR><BR>Thanks in advance<BR>David<BR>

  2. #2
    SPG Guest

    Default If I understand the question...

    ... you&#039re getting hung up on the fact that the wildcard "." doesn&#039t actually include the newline characters. What you need is a more inclusive wildcard like "[sS]" which includes everything that is and isn&#039t whitespace.<BR><BR>HiH -- if it doesn&#039t, I didn&#039t understand.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts