- "prompt_number": 102
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "fcwp(['h', '_', 'p', '_'], ['x', 'w'])"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 103,
- "text": [
- "'^(?!.*[xw])h.p.$'"
- ]
- }
- ],
- "prompt_number": 103
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "re.match('^(?!.*[xw])h.p.$', 'hwpe')"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 101
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "re.match('^(?!.*[xw])h.p.$', 'hape')"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 104,
- "text": [
- "<_sre.SRE_Match object; span=(0, 4), match='hape'>"
- ]
- }
- ],
- "prompt_number": 104
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "fcw(WORDS, ['h', '_', 'p', '_'], ['x', 'w', 's'])"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 108,
- "text": [
- "['hope', 'hype', 'hypo']"
- ]
- }
- ],
- "prompt_number": 108