Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

deleted 564 characters in body
Source Link
Miriam
  • 843
  • 7
  • 19

Python 3, (削除) 58 (削除ここまで) 5669 bytes

lambda r,s:re.match(re.sub('[_+]''(?<=[_*])\*+|[_+]','',r)+'$',s)
import re

Try it online! Try it online!

Simple - just convert it to ordinary regex, using ordinary regex!

-2 bytes thanks to Deadcode


Note from author: invalid due to chained repeats and repeats of nothing being allowed. Working on it.

Python 3, (削除) 58 (削除ここまで) 56 bytes

lambda r,s:re.match(re.sub('[_+]','',r)+'$',s)
import re

Try it online!

Simple - just convert it to ordinary regex, using ordinary regex!

-2 bytes thanks to Deadcode


Note from author: invalid due to chained repeats and repeats of nothing being allowed. Working on it.

Python 3, 69 bytes

lambda r,s:re.match(re.sub('(?<=[_*])\*+|[_+]','',r)+'$',s)
import re

Try it online!

Simple - just convert it to ordinary regex, using ordinary regex!

added 598 characters in body
Source Link
Miriam
  • 843
  • 7
  • 19

Python 3, 58(削除) 58 (削除ここまで) 56 bytes

import re
f=lambdalambda r,s:re.match(re.sub('[_+]','',r)+'$',s)
import re

Try it online! Try it online!

Simple - just convert it to ordinary regex, using ordinary regex!

-2 bytes thanks to Deadcode


Note from author: invalid due to chained repeats and repeats of nothing being allowed. Working on it.

Python 3, 58 bytes

import re
f=lambda r,s:re.match(re.sub('[_+]','',r)+'$',s)

Try it online!

Simple - just convert it to ordinary regex, using ordinary regex!

Python 3, (削除) 58 (削除ここまで) 56 bytes

lambda r,s:re.match(re.sub('[_+]','',r)+'$',s)
import re

Try it online!

Simple - just convert it to ordinary regex, using ordinary regex!

-2 bytes thanks to Deadcode


Note from author: invalid due to chained repeats and repeats of nothing being allowed. Working on it.

Source Link
Miriam
  • 843
  • 7
  • 19

Python 3, 58 bytes

import re
f=lambda r,s:re.match(re.sub('[_+]','',r)+'$',s)

Try it online!

Simple - just convert it to ordinary regex, using ordinary regex!

AltStyle によって変換されたページ (->オリジナル) /