- Number
- Expression
Expression Syntax Description
Category | Command | Parameter | Parameter Type | Parameter Limitations | Parameter Nullable | Parameter Desc | Command Desc | Example | Description |
---|---|---|---|---|---|---|---|---|---|
string | numberStringRand | length | int | ≥1 | no | specify the length of a numeric string | generate a string of random numeric characters of a specified length | ${numberStringRand@3} | generate a numeric string of length 3, which may start with 0 |
numberStringRandEx | numChar | string | N/A | no | the format is 0|1|9 . Specify the number used to generate a random number string | generate a random length numeric string composed of specified numbers | ${numberStringRandEx@0|1|2|3|9@3@100} | generate a numeric string consisting of 0, 1, 2, 3, and 9 with a length between 3 and 100 | |
minLength | int | ≥1 | no | minimum length of numeric string | |||||
maxLength | int | ≥minLength | no | maximum length of numeric string | |||||
lowerRand | minLength | int | ≥1 | no | minimum length of lowercase letter string | generate lowercase letter strings of random length | ${lowerRand@3@5} | generate a string consisting of lowercase letters with a length between 3 and 5 | |
maxLength | int | ≥minLength | no | maximum length of lowercase letter string | |||||
upperRand | minLength | int | ≥1 | no | minimum length of uppercase letter string | generate random length uppercase letter strings | ${upperRand@3@5} | generate a string consisting of uppercase letters with a length between 3 and 5 | |
maxLength | int | ≥minLength | no | maximum length of uppercase letter string | |||||
alphaNumberRand | minLength | int | ≥1 | no | minimum string length | generate a random length string composed of uppercase letters, lowercase letters, and numbers | ${alphaNumberRand@3@5} | generate a string of uppercase letters, lowercase letters, and numbers with a length between 3 and 5 | |
maxLength | int | ≥minLength | no | maximum string length | |||||
unicode | start | int (hex) | ≥00 | no | unicode character minimum codepoint, hexadecimal | generate random Unicode characters within the range | ${unicode@4E00@9FA5@3@5} | generate a string of random Chinese characters with a length between 3 and 5 | |
end | int (hex) | ≤10FFFF | no | unicode character maximum codepoint, hexadecimal | |||||
minLength | int | ≥1 | no | minimum string length | |||||
maxLength | int | ≥minLength | no | maximum string length | |||||
unicodeEx | rangeEx | string | N/A | no | unicode codepoint expression, can fill in multiple ranges. The supported forms are 00-FF,0256,4E00-9FA5 | generate random Unicode characters within the range | ${unicode@00-FF,0256,4E00-9FA5@3@5} | generate random strings with lengths between 3 and 5, within the range of 00-FF,0256,4E00-9FA5 | |
minLength | int | ≥1 | no | minimum string length | |||||
maxLength | int | ≥minLength | no | maximum string length | |||||
select | strList | string | the format is str1|str2|str3 | no | list of candidate strings | randomly select a string from the list of candidate strings | ${select@152|137|148|1999} | random select 152, 137, 148, 1999 | |
number | numberRangeRand | min | int or float | N/A | no | minimum value of random number, inclusive | generate random integers or floating-point numbers within a range | ${numberRangeRand@-1.237@3.989@4} | generate floating-point numbers greater than or equal to -1.237 and less than 3.989, with 4 digits retained after the decimal point |
max | int or float | >min | no | maximum value of random number, exclusive | |||||
precision | int | ≥0 | no | preserve precision after decimal point | |||||
numberStep | start | bigint | any size integer | no | Increment starting integer | generate increasing integer numbers | ${numberStep@999999999999999999999999@-100@0@16} | generate numbers starting from 999999999999999999999999, increasing by -100, not padding, and displaying numbers in hexadecimal | |
step | bigint | any size integer | no | incremental step size | |||||
padding | int | ≥0 | no | number padding length, 0 is not padding. If pad to the specified length is required, use leading 0 padding | |||||
radix | int | ≥2 ≤36 |
no | numeric base | |||||
numberBigintRangeRand | min | bigint | any size integer | no | minimum value of random number, inclusive | generate random integers within a range, supporting integers of unlimited size | ${numberBigintRangeRand@-999999@9999999999999999@4@10} | generate integers greater than or equal to -999999 and less than 99999999999999. Use 0 alignment for numbers with a length of less than 4 digits, and display the numbers in base 10 | |
max | bigint | any size integer, >min | no | maximum value of random number, exclusive | |||||
padding | int | ≥0 | no | number padding length, 0 is not padding. If pad to the specified length is required, use leading 0 padding | |||||
radix | int | ≥2 ≤36 |
no | numeric base | |||||
numberGaussian | mean | float | N/A | no | mean value | generate random numbers that conform to a normal distribution | ${numberGaussian@0@1@3} | generate a random number with a normal distribution of 0 mean and 1 standard deviation, and retain 3 as a number after the decimal point in the result | |
stdDev | float | ≥0 | no | standard deviation | |||||
precision | int | ≥0 | no | number after decimal point to be retained | |||||
numberGaussianRange | mean | float | >min, <max | no | mean value | generate random numbers within a range that conform to a normal distribution. Note: This command requires the correct setting of each parameter to ensure that the logical relationship of the parameters is correct | ${numberGaussianRange@0@0.5@3@-1@1} | generate a normal distribution of random numbers with an average of 0, a standard deviation of 0.5, and 3 decimal places, between -1 and 1 | |
stdDev | float | ≥0 | no | standard deviation | |||||
precision | int | ≥0 | no | number after decimal point to be retained | |||||
min | float | N/A | no | minimum value of random number, inclusive | |||||
max | float | >min | no | maximum value of random number, exclusive | |||||
numberBigfloatRangeRand | min | floating point number of any size | N/A | no | minimum value of random number, inclusive | generate floating-point numbers of any size within the range, with the ability to save any number of digits after the decimal point | ${numberBigfloatRangeRand@-1111111111111111111.2222222222@333333333333333333333333333333333333333333333333333333333333.555555@100} | random generate floating-point numbers from -1111111111111111111.2222222222 to 333333333333333333333333333333333333333333333333333333333333.555555 , keep 100 digits after decimal point | |
max | floating point number of any size | >min | no | maximum value of random number, exclusive | |||||
precision | int | ≥0 | no | number after decimal point to be retained | |||||
time | timeNow | format | string | time format string | no | time format string | generate a formatted string based on the current time | ${timeNow@X} | generate the current time string, format it as a Unix timestamp, in seconds |
timeStep | format | string | time format string | no | time format string | generate an increasing or decreasing time series and format it in the specified time format | ${timeStep@YYYY-MM-DD HH:mm@2020-01-01 12:00:00@300000} | generate a time string starting from 2020-01-01 12:00:00, with an increment of 5 minutes. The format of the generated time string is YYYY-MM-DD HH:mm | |
start | string | the format is 2022-01-03 20:59:59 or 2022-01-03 20:59:59.123 | no | start time | |||||
stepMilli | int | N/A | no | time increasing step size, measured in milliseconds, supports positive or negative numbers | |||||
timeRand | format | string | time format string | no | time format string | generate random time within the range and format it in the specified format | ${timeRand@x@2022-01-01 00:00:00@2023-01-01 00:00:00} | randomly generate a time between 2022-01-01 00:00:00 and 2023-01-01 00:00:00, and format it as a Unix timestamp in milliseconds | |
start | string | the format is 2022-01-03 20:59:59 or 2022-01-03 20:59:59.123 | no | start time | |||||
end | string | the format is 2022-01-03 20:59:59 or 2022-01-03 20:59:59.123, ≥start | no | end time | |||||
expression | expr | exprContent | string | valid expression statements | no | expression statement, using expressions to generate fields. The expression supports using \index to reference other fields, such as \1 + \3 indicating the use of the sum of the first and third fields in the template as the value of this field. If the other fields referenced by the expression are of string type, the referenced fields need to be enclosed in single quotes. For example, '\3'. Multiple operators and mathematical functions are supported in expressions, please refer to the Expression Syntax for details. | use expressions to generate field values. | ${expr@\1 - sqrt(\3) + 100} | Subtract the square root of the value of the third field from the value of the first field in the template, and then add 100. |
Generate a string sequence based on numbers or expressions online. This tool supports batch generation of serial no list, or other text sequences with specific rules.
The Sequence Generator Online tool supports generation of sequence, or text sequences conforming to specific protocols. The typical use of this tool is to generate serial numbers and generate random text data in batches according to the protocols. Generation supports simple generation of text sequences based on numbers and advanced generation of complex text sequences based on expressions. Expressions support random strings, numbers, floating-point numbers, time, and Unicode characters to participate in text generation.
- Number : Use the upper and lower limits of numbers to generate a number sequence, and add an optional prefix or suffix to generate a specific text sequence. It is suitable for simple serial number generation.
- Expression : Generate text sequences using supported expression syntax. It is suitable for complex text data generation. For expression syntax, refer to the above syntax description. The expression you fill in must be completely correct.
- The download file encoding is UTF-8 .
-
Time Format Documentation
Format Output Description YY
18 Two-digit year YYYY
2018 Four-digit year M
1-12 The month, beginning at 1 MM
01-12 The month, 2-digits MMM
Jan-Dec The abbreviated month name MMMM
January-December The full month name D
1-31 The day of the month DD
01-31 The day of the month, 2-digits d
0-6 The day of the week, with Sunday as 0 dd
Su-Sa The min name of the day of the week ddd
Sun-Sat The short name of the day of the week dddd
Sunday-Saturday The name of the day of the week H
0-23 The hour HH
00-23 The hour, 2-digits h
1-12 The hour, 12-hour clock hh
01-12 The hour, 12-hour clock, 2-digits m
0-59 The minute mm
00-59 The minute, 2-digits s
0-59 The second ss
00-59 The second, 2-digits SSS
000-999 The millisecond, 3-digits Z
+05:00 The offset from UTC, ±HH:mm ZZ
+0500 The offset from UTC, ±HHmm A
AM PM a
am pm Q
1-4 Quarter Do
1st 2nd ... 31st Day of Month with ordinal k
1-24 The hour, beginning at 1 kk
01-24 The hour, 2-digits, beginning at 1 X
1360013296 Unix Timestamp in second x
1360013296123 Unix Timestamp in millisecond -
Expression Syntax Documentation
-
Basic Explanation
- Reference other fields of the template in the expression, with the starting index number 1.
-
If the expression uses \index to reference other field values in the
template, the implementation method is to directly replace the value of the field with the position
where the reference appears. Understanding this is very important.
- If the field value referenced by the \index is a string value, it needs to be enclosed in single quotation marks or double quotation marks. If a single quotation mark or double quotation marks appears in the string value, it needs to be escaped, otherwise the statement is not a valid expression statement.
- For numerical field references, in some cases (when the operator priority of the field is higher than the unary negative operator), it is necessary to wrap the field with parentheses to increase the priority when the field value is negative. For example, when the expression \1^2 refers to the \1 field and the value of the field is -5, the calculation result is -25, which is incorrect and unexpected. This is because the statement after replacing the expression is -5^2, and the ^ operator has a higher priority than -. To obtain the correct result at this point, the expression needs to be modified to(\1)^2.
- In addition to the operators and functions listed below, JavaScript's built-in Math object, JSON object, parseInt method, and parseFloat method can also be used in expressions. For example, the expression Math.trunc(\1) truncates the value of field 1 to an integer.
- Tips: The default unit for input values of trigonometric functions in this tool is radians. If the numerical unit you entered is degrees, you need to set the unit to degrees.
- The operators, priorities, functions, and constants supported by this tool: Reference Documentation .
-
Basic Explanation