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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.