Skip to content

Instantly share code, notes, and snippets.

@syoh
Last active April 27, 2018 05:28
Show Gist options
  • Save syoh/d080c5aa39d0532baf2e25f37944d677 to your computer and use it in GitHub Desktop.
Save syoh/d080c5aa39d0532baf2e25f37944d677 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hello\n"
]
}
],
"source": [
"%%bash\n",
"echo 'href=\"hello\"' | grep -Po '(?<=href=\")[^a]*(?=\")'"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hello\"\"bye\n"
]
}
],
"source": [
"%%bash\n",
"echo 'href=\"hello\"\"bye\"' | grep -Po '(?<=href=\")[^a]*(?=\")'"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hello\"\"\"\"\"\"\"\"bye\n"
]
}
],
"source": [
"%%bash\n",
"echo 'href=\"hello\"\"\"\"\"\"\"\"bye\"' | grep -Po '(?<=href=\")[^a]*(?=\")'"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hello\n"
]
}
],
"source": [
"%%bash\n",
"echo 'href=\"hello\"\"\"\"\"\"\"\"bye\"' | grep -Po '(?<=href=\")[^\"]*(?=\")'"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment