I want to write a regex to match only the first and last strings below. So far, I got this regex
%[\w]+@\{[\w"]+\}%
but it wont match anything:
%adasda@{"asdas":"asdas"}% // should match
5% ashdgasjhdgas % //no match
5%ahsdjhasj % // no match
%asdasdas% //should match
希望对您有所帮助:
^%\w+(@[\{"\w\}:]+)*%$
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.