Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > How to... > Search

EmEditor How to: Number Range Expression Syntax

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - How to - Search

Number Range Expression Syntax

EmEditor allows you to use number range expressions as search expressions.

To use a number range in Find, Replace, Find in Files, Replace in Files, or Advanced Filter dialog box select Number Range from the Mode drop-down list box.

To use a number range in Find, Replace, FindInFiles, ReplaceInFiles, or Filter methods of macros, include the eeExFindNumberRange flag to the ExFlags parameter.

A number range is expressed as an interval notation. A bracket indicates an included endpoint, and a parenthesis indicates an excluded endpoint. If both numbers do not include a decimal point, the method matches only integers. Minimum and/or maximum number may be omitted to mean negative and/or positive infinity. The number format depends on the locale specified in the Locale drop-down list box in the Sort page of the Customize dialog box. In some locales (such as German), a comma (',') is used to denote a decimal point, and in that case, a space before and after the separator comma is necessary to avoid ambiguity.

As of v19.6, a number range can specify a set of numbers with a specified increment. An increment can be specified as the third parameter "c" in [a , b , c] or (a , b , c).

For instance,

Number Range

Meaning

[1 , 9]

matches integers 1, 2, 3, ..., 9.

[ , 9)

matches any integers less than 9.

[1.0 , 9.0)

matches decimal numbers greater than or equal to 1.0, and less than 9.0.

[ , 1.0)

matches any decimal numbers less than 1.0

(2.0 , ]

matches any decimal number greater than 2.0

[1 , 9 , 2]

matches intergers 1, 3, 5, 7, 9.

(0 , 100 , 25]

matches integers 25, 50, 75, 100.

See Also

Replacement Expression Syntax

Copyright © 2003-2021 by Emurasoft, Inc.