import re

paragraph = """
Approved ✓ 4659016713060020|06|27|737 [ Charged : $2.3 ] Bin : 465901 - DEBIT Bank : BARCLAYS BANK PLC ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 5295800051917207|12|2027|678 [ Charged : $3.0 ] Bin : 529580 - DEBIT Bank : VINCENTO PAYMENT SOLUTIONS, LTD. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4658583252507209|12|2027|544 [ Charged : $3.3 ] Bin : 465858 - DEBIT Bank : BARCLAYS BANK PLC ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4357017000855051|02|2026|275 [ Charged : $2.0 ] Bin : 435701 - DEBIT Bank : FIRST FINANCIAL BANK ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 5234413547349532|01|27|095 [ Charged : $2.6 ] Bin : 523441 - CREDIT Bank : DEUTSCHE KREDITBANK AG (DKB), LUFTHANSA, MILES AND MORE ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4133310397501748|06|26|000 [ Charged : $3.4 ] Bin : 413331 - CREDIT Bank : CUSCAL, LTD. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4737033038736271|10|27|052 [ Charged : $2.9 ] Bin : 473703 - DEBIT Bank : WELLS FARGO ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 5570987637693729|07|28|413 [ Charged : $2.5 ] Bin : 557098 - CREDIT Bank : BANK OF SCOTLAND PLC ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4661880083348257|11|26|264 [ Charged : $1.5 ] Bin : 466188 - DEBIT Bank : BRANCH BANKING AND TRUST COMPANY ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4145808723459156|05|26|970 [ Charged : $1.5 ] Bin : 414580 - DEBIT Bank : AMERICAN SAVINGS BANK, F.S.B. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4258284532701324|05|25|907 [ Charged : $1.9 ] Bin : 425828 - DEBIT Bank : WILMINGTON TRUST, N.A. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4334770053455918|10|2026|749 [ Charged : $3.4 ] Bin : 433477 - DEBIT Bank : FIRST-CITIZENS BANK AND TRUST COMPANY ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4258084538801064|08|27|261 [ Charged : $3.1 ] Bin : 425808 - DEBIT Bank : WILMINGTON TRUST, N.A. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 5354568870040919|04|27|577 [ Charged : $3.6 ] Bin : 535456 - DEBIT Bank : VTB BANK OJSC ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4756072201409148|07|26|396 [ Charged : $2.5 ] Bin : 475607 - DEBIT Bank : SUNFLOWER BANK, N.A. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4758330007576124|02|26|459 [ Charged : $3.2 ] Bin : 475833 - CREDIT Bank : USU CHARTER F.C.U. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 5182130024334447|11|27|879 [ Charged : $3.0 ] Bin : 518213 - CREDIT Bank : METABANK ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4349600005837744|05|26|004 [ Charged : $2.7 ] Bin : 434960 - CREDIT Bank : SWISS POST ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4708810021734941|01|2028|232 [ Charged : $2.4 ] Bin : 470881 - CREDIT Bank : YES BANK, LTD. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4624061001785633|10|26|819 [ Charged : $2.2 ] Bin : 462406 - DEBIT Bank : BROADWAY NATIONAL BANK ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 5398050002200834|04|26|572 [ Charged : $3.9 ] Bin : 539805 - DEBIT Bank : JACK HENRY AND ASSOCIATES ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4315037514481716|10|25|404 [ Charged : $2.2 ] Bin : 431503 - CREDIT Bank : SILVERTON BANK, N.A. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 5282870115091930|01|25|435 [ Charged : $1.9 ] Bin : 528287 - CREDIT Bank : VINCENTO PAYMENT SOLUTIONS, LTD. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker

#Approved ✓ 4654030000832731|03|26|158 [ Charged : $1.6 ] Bin : 465403 - CREDIT Bank : VISA ARGENTINA, S.A. ★ CCN LIVE ★ Checked at [Gate: 3] RSO Checker
"""

# Define the pattern to match the desired data
pattern = r'Approved ✓ (.*?) \['

# Find all matches in the paragraph
matches = re.findall(pattern, paragraph)

# Print the matches
for match in matches:
    print(match)
 

Python Online Compiler

Write, Run & Share Python code online using OneCompiler's Python online compiler for free. It's one of the robust, feature-rich online compilers for python language, supporting both the versions which are Python 3 and Python 2.7. Getting started with the OneCompiler's Python editor is easy and fast. The editor shows sample boilerplate code when you choose language as Python or Python2 and start coding.

Taking inputs (stdin)

OneCompiler's python online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample python program which takes name as input and print your name with hello.

import sys
name = sys.stdin.readline()
print("Hello "+ name)

About Python

Python is a very popular general-purpose programming language which was created by Guido van Rossum, and released in 1991. It is very popular for web development and you can build almost anything like mobile apps, web apps, tools, data analytics, machine learning etc. It is designed to be simple and easy like english language. It's is highly productive and efficient making it a very popular language.

Tutorial & Syntax help

Loops

1. If-Else:

When ever you want to perform a set of operations based on a condition IF-ELSE is used.

if conditional-expression
    #code
elif conditional-expression
    #code
else:
    #code

Note:

Indentation is very important in Python, make sure the indentation is followed correctly

2. For:

For loop is used to iterate over arrays(list, tuple, set, dictionary) or strings.

Example:

mylist=("Iphone","Pixel","Samsung")
for i in mylist:
    print(i)

3. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while condition  
    #code 

Collections

There are four types of collections in Python.

1. List:

List is a collection which is ordered and can be changed. Lists are specified in square brackets.

Example:

mylist=["iPhone","Pixel","Samsung"]
print(mylist)

2. Tuple:

Tuple is a collection which is ordered and can not be changed. Tuples are specified in round brackets.

Example:

myTuple=("iPhone","Pixel","Samsung")
print(myTuple)

Below throws an error if you assign another value to tuple again.

myTuple=("iPhone","Pixel","Samsung")
print(myTuple)
myTuple[1]="onePlus"
print(myTuple)

3. Set:

Set is a collection which is unordered and unindexed. Sets are specified in curly brackets.

Example:

myset = {"iPhone","Pixel","Samsung"}
print(myset)

4. Dictionary:

Dictionary is a collection of key value pairs which is unordered, can be changed, and indexed. They are written in curly brackets with key - value pairs.

Example:

mydict = {
    "brand" :"iPhone",
    "model": "iPhone 11"
}
print(mydict)

Supported Libraries

Following are the libraries supported by OneCompiler's Python compiler

NameDescription
NumPyNumPy python library helps users to work on arrays with ease
SciPySciPy is a scientific computation library which depends on NumPy for convenient and fast N-dimensional array manipulation
SKLearn/Scikit-learnScikit-learn or Scikit-learn is the most useful library for machine learning in Python
PandasPandas is the most efficient Python library for data manipulation and analysis
DOcplexDOcplex is IBM Decision Optimization CPLEX Modeling for Python, is a library composed of Mathematical Programming Modeling and Constraint Programming Modeling