Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
@"
^(?sn)(?(?!)(?<result>)(?<error>)(?<halt>))(?>.(?<=(?>^(?=(?>(?(p)(?<-p>\k<p>)|\#*)(?>(?(p)(?!))(?(halt)(?!))(?(error)(?!))(?(d)(?>\\.|""(?<-d>)|.|$(?<error>))|(?>(?>\+(?<w0>)|\-(?<w0>)(?<w1>)(?<w2>)(?<w3>)(?<w4>)(?<w5>)(?<w6>)(?<w7>))(?<w1>(?<-w0>)(?<-w0>))?(?<w2>(?<-w1>)(?<-w1>))?(?<w3>(?<-w2>)(?<-w2>))?(?<w4>(?<-w3>)(?<-w3>))?(?<w5>(?<-w4>)(?<-w4>))?(?<w6>(?<-w5>)(?<-w5>))?(?<w7>(?<-w6>)(?<-w6>))?((?<-w7>)(?<-w7>))?|\[(?(w0)|(?(w1)|(?(w2)|(?(w3)|(?(w4)|(?(w5)|(?(w6)|(?(w7)|(?>(?>[^\[\]]|(?<d>\[)|(?<-d>\]))*(?(d)(?!)|\])|(?<=(?<error>\[)))))))))))|\](?(w0)|(?(w1)|(?(w2)|(?(w3)|(?(w4)|(?(w5)|(?(w6)|(?(w7)|(?<d>)))))))))(?(d)(?<-d>)|(?>(?<=(?>(?<=(?>(?<p>^.*)))(?(d)(?!)|(?<=\[))(?>[^\[\]]|(?<-d>\[)|(?<d>\]))*)\])))|\>(?<=(?>(?(a0)(?=(?<-a0>\k<a0>(?(?<=^)(?<w0>))))(?=(?<-a1>\k<a1>(?(?<=^)(?<w1>))))(?=(?<-a2>\k<a2>(?(?<=^)(?<w2>))))(?=(?<-a3>\k<a3>(?(?<=^)(?<w3>))))(?=(?<-a4>\k<a4>(?(?<=^)(?<w4>))))(?=(?<-a5>\k<a5>(?(?<=^)(?<w5>))))(?=(?<-a6>\k<a6>(?(?<=^)(?<w6>))))(?=(?<-a7>\k<a7>(?(?<=
"
Input 1
" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz?!@#$%^&*()_+-=" [ Example from https://en.wikipedia.org/wiki/Brainfuck#Hello_World! ] [ This program prints "Hello World!" and a newline to the screen; its length is 106 active command characters. [It is not the shortest.] This loop is an "initial comment loop", a simple way of adding a comment to a BF program such that you don't have to worry about any command characters. Any ".", ",", "+", "-", "<" and ">" characters are simply ignored, the "[" and "]" characters just have to be balanced. This loop and the commands it contains are ignored because the current cell defaults to a value of 0; the 0 value causes this loop to be skipped. ] ++++++++ Set Cell #0 to 8 [ >++++ Add 4 to Cell #1; this will always set Cell #1 to 4 [ as the cell will be cleared by th