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

Is there something faster than .|[
] in Regular Expressions ?

Comments

  • : 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

  • : : 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("/\*(.|[
    ])*?\*/");

  • : : : 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.

Howdy, Stranger!

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

Categories

In this Discussion