Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florestan Biaux
Messenger Statistics
Commits
faa43228
Commit
faa43228
authored
Jul 21, 2021
by
Florestan Biaux
💬
Browse files
Regex de la conversation
parent
eef7149a
Changes
2
Hide whitespace changes
Inline
Side-by-side
get.py
View file @
faa43228
def
get
(
nom
):
import
re
import
string
def
get
(
name
):
# remove whitspaces
conv
=
name
.
replace
(
" "
,
""
)
# lowercase
conv
=
conv
.
lower
()
# regex _*
conv
=
conv
+
"_.*"
# return final conv name
return
conv
main.py
View file @
faa43228
import
tri
import
get
if
__name__
==
"__main__"
:
# demander le nom de la conv à analyser
name
=
input
(
"Quel est le nom de la conversation à analyser ?"
)
# recuperer bonne conversation
conv
=
get
.
get
(
name
)
\ No newline at end of file
# demander le nom de la conv à analyser
name
=
str
(
input
(
"Quel est le nom de la conversation à analyser ?"
))
# give regex of conversation name
conv
=
get
.
get
(
name
)
print
(
conv
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment