mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
avoid contractions
This commit is contained in:
@@ -103,7 +103,7 @@ Pattern.compile("^\\s+|\\s+$").matcher(text).replaceAll("") // BAD</sample>
|
||||
|
||||
<example>
|
||||
<p>
|
||||
Sometimes it's unclear how a regular expression can be rewritten to
|
||||
Sometimes it is unclear how a regular expression can be rewritten to
|
||||
avoid the problem. In such cases, it often suffices to limit the
|
||||
length of the input string. For instance, the following complicated
|
||||
regular expression is used to match numbers, and on some non-number
|
||||
@@ -114,7 +114,7 @@ Pattern.compile("^\\s+|\\s+$").matcher(text).replaceAll("") // BAD</sample>
|
||||
Pattern.matches("^(\\+|-)?(\\d+|(\\d*\\.\\d*))?(E|e)?([-+])?(\\d+)?$", str); </sample>
|
||||
|
||||
<p>
|
||||
It's not immediately obvious how to rewrite this regular expression
|
||||
It is not immediately obvious how to rewrite this regular expression
|
||||
to avoid the problem. However, it might be fine to limit the length
|
||||
to 1000 characters, which will always finish in a reasonable amount
|
||||
of time.
|
||||
|
||||
@@ -103,7 +103,7 @@ text.replace(/^\s+|\s+$/g, ''); // BAD</sample>
|
||||
|
||||
<example>
|
||||
<p>
|
||||
Sometimes it's unclear how a regular expression can be rewritten to
|
||||
Sometimes it is unclear how a regular expression can be rewritten to
|
||||
avoid the problem. In such cases, it often suffices to limit the
|
||||
length of the input string. For instance, the following complicated
|
||||
regular expression is used to match numbers, and on some non-number
|
||||
@@ -114,7 +114,7 @@ text.replace(/^\s+|\s+$/g, ''); // BAD</sample>
|
||||
/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/.test(str) // BAD</sample>
|
||||
|
||||
<p>
|
||||
It's not immediately obvious how to rewrite this regular expression
|
||||
It is not immediately obvious how to rewrite this regular expression
|
||||
to avoid the problem. However, it might be fine to limit the length
|
||||
to 1000 characters, which will always finish in a reasonable amount
|
||||
of time.
|
||||
|
||||
@@ -103,7 +103,7 @@ re.sub(r"^\s+|\s+$", "", text) # BAD</sample>
|
||||
|
||||
<example>
|
||||
<p>
|
||||
Sometimes it's unclear how a regular expression can be rewritten to
|
||||
Sometimes it is unclear how a regular expression can be rewritten to
|
||||
avoid the problem. In such cases, it often suffices to limit the
|
||||
length of the input string. For instance, the following complicated
|
||||
regular expression is used to match numbers, and on some non-number
|
||||
@@ -114,7 +114,7 @@ re.sub(r"^\s+|\s+$", "", text) # BAD</sample>
|
||||
match = re.search(r'^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$', str) </sample>
|
||||
|
||||
<p>
|
||||
It's not immediately obvious how to rewrite this regular expression
|
||||
It is not immediately obvious how to rewrite this regular expression
|
||||
to avoid the problem. However, it might be fine to limit the length
|
||||
to 1000 characters, which will always finish in a reasonable amount
|
||||
of time.
|
||||
|
||||
@@ -108,7 +108,7 @@ text.gsub!(/^\s+|\s+$/, '') # BAD</sample>
|
||||
|
||||
<example>
|
||||
<p>
|
||||
Sometimes it's unclear how a regular expression can be rewritten to
|
||||
Sometimes it is unclear how a regular expression can be rewritten to
|
||||
avoid the problem. In such cases, it often suffices to limit the
|
||||
length of the input string. For instance, the following complicated
|
||||
regular expression is used to match numbers, and on some non-number
|
||||
@@ -119,7 +119,7 @@ text.gsub!(/^\s+|\s+$/, '') # BAD</sample>
|
||||
is_matching = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/.match?(str)</sample>
|
||||
|
||||
<p>
|
||||
It's not immediately obvious how to rewrite this regular expression
|
||||
It is not immediately obvious how to rewrite this regular expression
|
||||
to avoid the problem. However, it might be fine to limit the length
|
||||
to 1000 characters, which will always finish in a reasonable amount
|
||||
of time.
|
||||
|
||||
Reference in New Issue
Block a user