Something like this should work:
^([-+/*]\d+(\.\d+)?)*
^
– beginning of the string[-+/*]
– one of these operators\d+
– one or more numbers(\.\d+)?
– an optional dot followed by one or more numbers()*
– the whole expression repeated zero or more times
More Related Contents:
- Awk – replace coumn 2 in table 1 from coumn 2 in table 2 based on matching data in column 1 (common between tables)
- Reference – What does this regex mean?
- How do I match any character across multiple lines in a regular expression?
- How do you match only valid roman numerals with a regular expression?
- Validating IPv4 addresses with regexp
- Regular expression pipe confusion
- How to use conditionals when replacing in Notepad++ via regex
- Find CRLF in Notepad++
- What flavor of Regex does Visual Studio Code use?
- Jmeter extracting fields/parsing JSON response
- How to back reference “inner” selections ( () ) in a regular expression?
- Regular expression – PCRE does not support \L, \l, \N, \P,
- Verbs that act after backtracking and failure
- mod_rewrite: replace underscores with dashes
- Multiline regex to match config block
- How is the AND/OR operator represented as in Regular Expressions?
- Remove ‘index.php’ from URL with .htaccess
- Regex Until But Not Including
- Multiple words in any order using regex [duplicate]
- Match at every second occurrence
- Deprecated: Function split() is deprecated. How to rewrite this statement?
- PostgreSQL Regex Word Boundaries?
- regular expression capture nth match
- What regex will match every character except comma ‘,’ or semi-colon ‘;’?
- Regex that matches integers in between whitespace or start/end of string only
- Regex to match an ISO 8601 datetime string
- Match Sequence using RegEx After a Specified Character
- Nginx location “not equal to” regex
- How to capture multiple regex matches, from a single line, into the $matches magic variable in Powershell?
- Regex for field that allows numbers and spaces