Use of the "|"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    Use of the "|"

    I had another question which I forgot to include in my earlier post. How many times can I use the "|" in my regular expressions? For example, and this doesn't work the way that I want it to, here is a regular expression that I attempting to use to ignore a <!DOCTYPE> tag that is on a single line in one file, but split into two lines in the other (template issue mentioned in the other message).

    <!DOCTYPE(.*)|(\n*)|(\s*)|(\r*?)>

    I am trying to ignore everything in that tag, including line feeds, or new line characters.

    The BC help file simply uses A|B as an example, but not A|B|C, so I have no idea how many times I can use "|" in a row.

    Thanks

    InQ
  • Zoë
    Team Scooter
    • Oct 2007
    • 2666

    #2
    Re: Use of the \"|\"

    The limit for pipe characters is at least 14; it might be higher. We don't support multi-line regular expressions though, so \n and \r are not supported. I'm sure it's on our wishlist to do so, but it won't be soon.

    You should be able to do this with delimiters, though again it will require 2.1 or later. Just put <!DOCTYPE as the starting delimiter and > as the ending delimiter. The text between delimiters can span lines.
    Zoë P Scooter Software

    Comment

    Working...