LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hello%

Solved!
Go to solution

Scan From String:
Input string: %Hello

format: %%%s

Output: Hello

 

My Problem:

Input String: %Hello%

format: ?

Output: Hello

0 Kudos
Message 1 of 2
(111 Views)
Solution
Accepted by maxnoder1995

%%%[^%] is sufficient.

%%%[^%]%% if the last % is required.

 

See Format Specifier Syntax

 

Spoiler
  • [ ]—Characters in set. [ ] matches a string that contains only the characters specified between the brackets. Character matches are case sensitive. The [ ] conversion code is useful only when you are scanning strings. To match the caret symbol (^) in a set, make sure it is not the first character after the bracket. The following examples demonstrate the use of the characters in set conversion code:
    • %[aeiou]—Matches any string that contains only lowercase vowels.
    • %[0-9a-zA-Z ]—Matches a string that contains numbers, letters, or spaces. You can use a hyphen to specify ranges of characters in the set.
    • %[^,;]—Matches any string of characters up to but not including the first comma or semicolon.

 If the parameter represented by Hello can also contain a %, then use "Match Pattern" or "Match Regular Expression" instead to allow backtracking.

Message 2 of 2
(96 Views)