Special Character Coding Challenge - Check string for validity (Lots of rules) There are 5 different "special characters": % &amp; # $ !

These special characters are in a string with numbers. Like so: "5 !    60%2$5.3" (valid). You must determine the validity of the string and there are certain rules in order to determine validity of the string. 

Rules:


These special characters can exist in a string, however they cannot be next to each other (ignoring spaces). For example:


"!%" is invalid
"% %" is invalid
"#     %    $" is invalid

The only exception to the rule above is with the exclamation mark. Only one exclamation mark may be after another special character. These assume there are numbers before and after the special characters. For example:


"!!" is valid
"!!!" is invalid
"$!" is valid
"$!!" is invalid
"!$" is invalid

If a special character is at the end of the string, there MUST be a number after it (ignoring spaces). If a special character is at the start of the string, there MUST be a number before it. For example:


"5!" is invalid
"5!5" is valid
"5#!5" is valid
"%5" is invalid

The only exception to the rule above is with the exclamation mark. There does not need to be a number before the exclamation mark assuming there is a number after it. For example:


"!5" is valid
”!!5" is invalid
"5!!5” is valid

If there is a string with only numbers, that string is valid, if there is a space between the space is invalid. For example:


"2   5" is invalid
"25" is valid

If a string only contains operators it is automatically invalid. For example:


"!#%" is invalid
"#" is invalid



Extra Examples of Strings that are VALID


"5%!5"
"!5 !5 %!5"
"5.4 $ 2.9 !3.4 &amp;! 89.8213"


Extra Examples of Strings that are INVALID


"5%%5"  (reason: two "%%") 
"!5!!!!!!!!%%%5" (reason: way too many operators next to each other)
"!5 !5 !" (reason: no number after the last "!")
"2.0%"  (reason: no number after "%")
"!6.9#" (reason: no number after "#")
"$6.9&amp;" (reason: no number after "#" AND no number before "$")


A number is a run of 0-9 digits with a possible . to indicate decimals. 

You can assume you will only get a string with either numbers and/or these special characters inside. You can also assume the numbers will not have floating zeros like 9.000 or 0004 or 00.00. Treat a single zero as any other number, so for example 0$0 is valid. You can assume you won't receive an empty string.

Game winning criteria objective: code-golf

(If you want a more difficult challenge try using python3 without using eval or exec.) This was originally planned.
Raku, 41 bytes



{?/^[\s*\!?\s*\d+\.?\d*\s*]+%&lt;[%&amp;#$!]&gt;$/}


Try it online!

Checks if the input matches against a regex.

Explanation:

{?/^                                 $/}  # Check if the input is
    [                     ]+  # A series of
        \!?                   # An optional ! followed by
              \d+\.?\d*       # A number
     \s*   \s*         \s*    # Interspersed with optional whitespace
                            %           # Joined by
                             &lt;[    ]&gt;   # Any of
                               %&amp;#!     # The special characters