Is this a bug or my regular expression is wrong?
-
I’m searching for the data below the Data and this regular expression can not find it
^Data\n(.+)\n(^[a-zA-Z(\n0-9[-\’$\Č\à,\Å:\é\Ü\Ö.\ö\ø\Ø\Ł ].\n)+(.(\btransitive verb|\btransitive and intransitive verb).\n)+(^[a-zA-Z (\n0-9[@-\’$\Č\à,\Å:\é\Ü\Ö.\ö\ø\Ø\Ł"].\n)+
For example, the line spaces between the lines just below this sentence is three. It will not work.
schoolwork to challenge able children
<new line>
<new line>
<new line>
transitive verb (past and past participle abled, present participle abling, 3rd person present singular ables) CaribbeanHowever, if I change the line spaces to two, it works…
schoolwork to challenge able children
<new line>
<new line>
transitive verb (past and past participle abled, present participle abling, 3rd person present singular ables) CaribbeanIs there something wrong with my regular expression that is causing this problem?
Data
ableable
adjective (comparative abler, superlative ablest)-
in position to do something: physically or mentally equipped to do something, especially because of circumstances and timing
Were you able to reach her before she left? -
capable or talented: having the necessary resources or talent to do something
a very able administrator -
education good at learning: quick to learn in an educational environment
schoolwork to challenge able children
transitive verb (past and past participle abled, present participle abling, 3rd person present singular ables) Caribbean
- be able to do something: to be able or have the ability to do something
- tolerate something: to put up with something
[14th century. Via Old French (h)able < Latin habilis “easy to hold or handle” < habere “have, hold”]
Word Key: Synonyms
See intelligent.
@@@
-
-
@Chris-Chris said in Is this a bug or my regular expression is wrong?:
Is there something wrong with my regular expression that is causing this problem?
We cannot tell exactly what your regex is – we see bold and italics in your regex, which indicates there is some number of asterisks and/or underscores in the regex.
I suggest you read the Formatting Forum Posts and Template for Search/Replace Questions entries (which were both linked in the Please Read Before Posting).
In short, the advice is to please put example regexes between backticks, like
`regex with *asterisks* or _underscores_`
, which will render asregex with *asterisks* or _underscores_
, and to put example data in between lines of three backticks ``` (which can be inserted using the</>
button on the forum toolbar), as shown in those other pages. -
Yea, for sure read and follow the template for posting such questions!