regsub and regexp


(use the exp to match the string, it it matches, put it to sting), if it matches, it returns 1, if not matches, it returns 0.

options:
-indices: return the start and endpoint index of the matching string.

-expanded: ignore the whitespace and comments.
-nocase:

-all:
![]()
by default, it will find the last space where it finds, but here it matches all.
-inline:


regexp h h1 exp
>>it returns 1; the value of exp is now: h.
regexp {^[0-9]+$} 510
=>1
regexp {^[0-9]+$} -510
=>0

Regsub

浙公网安备 33010602011771号