Is there something faster than .|[<br /> <br /> ] in RegExp ? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Is there something faster than .|[
] in RegExp ?

ektorasektoras Posts: 9Member
Is there something faster than .|[
] in Regular Expressions ?

Comments

  • IDKIDK Posts: 1,784Member
    : Is there something faster than .|[
    ] in Regular Expressions ?
    :
    Whait! What does it do?
    Am I correct if I say that you want
    to get if there is a linebreak in a
    string?

    Then you could use
    String.indexof

    I don't know regex.
    =============================
    The PROgrammer Niklas Ulvinge

  • ektorasektoras Posts: 9Member
    : : Is there something faster than .|[
    ] in Regular Expressions ?
    : :
    : Whait! What does it do?
    : Am I correct if I say that you want
    : to get if there is a linebreak in a
    : string?
    :
    : Then you could use
    : String.indexof
    :
    : I don't know regex.
    : =============================
    : The PROgrammer Niklas Ulvinge
    :
    : I want to match multiple-line comments from /* to */ so I use:
    Regex regex = new Regex("/\*(.|[
    ])*?\*/");

  • IDKIDK Posts: 1,784Member
    : : : Is there something faster than .|[
    ] in Regular Expressions ?
    : : :
    : : Whait! What does it do?
    : : Am I correct if I say that you want
    : : to get if there is a linebreak in a
    : : string?
    : :
    : : Then you could use
    : : String.indexof
    : :
    : : I don't know regex.
    : : =============================
    : : The PROgrammer Niklas Ulvinge
    : :
    : : I want to match multiple-line comments from /* to */ so I use:
    : Regex regex = new Regex("/\*(.|[
    ])*?\*/");
    :
    :
    If you want the fastest way I think:
    Do it manualy!
    With a for statemant that goes thru
    the whole thing...
    =============================
    The PROgrammer Niklas Ulvinge

Sign In or Register to comment.