regex - Netbeans Multi-line Regular Expression Search -
I am trying to search all HTML input tags with 'text' within Netbeans 6.9.
Does Netbeans assist in looking for a string using regular expressions with different search criteria spread across different lines or does it work only in one line?
This regular expression
> . & Lt ;. Input * type = [']] text [']] * />
then works when the entire tag and its attributes are written in a row like this
But because I avoid writing long lines of code and breaking them like this
The same regular expression does not work.
Is there any way that can be achieved?
By default, code>. Metacharcher does not match Newline "single-line" or "dopple" or a similar alternative, which gives the dot match to every character or you start the regex You can add (? S)
to and get the same effect for the same résx.
But would be better to replace *
with [^ < & Gt;] *
. In dotl mode, . *
will attempt to complete the entire document, which will result in slow performance and / or incorrect matches, but [^ < & Gt;] *
will never try to match the end of the tag.
By the way, if you are using ['|']]
to match a single coat or double-dot, | Get rid of
. "Or" is contained in a class, so you only need ["]]
( | / code)> will match only one verbatim word.
).
Comments
Post a Comment