Questions tagged [regex]

Regular expressions provide a declarative language to match patterns within strings. They are commonly used for string validation, parsing, and transformation. Since regular expressions are not fully standardized, all questions with this tag should also include a tag specifying the applicable programming language or tool. NOTE: Asking for HTML, JSON, etc. regexes tends to be met with negative reactions. If there is a parser for it, use that instead.

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
184 views

How to automatically verify official documents?

I am new to machine learning and data science. I apologise if the question seems very basic. I have a requirement where I need to verify information submitted via a form with the corresponding ...
2
votes
1answer
519 views

R Studio - grepl compare a column in a dataframe to a list of pattern

I have a column named "MATCH" in a dataframe and a list of patterns named "PATTERN". ...
1
vote
1answer
55 views

pandas series match multiple keywords

Is there a direct python pandas method to match values of series and update different series with some string ? I couldn’t find any direct method of doing it. Here the match is to find a value in a ...
1
vote
0answers
34 views

Fastest way to parse regex in R

I need to parse around 1.6k REGEX expressions such as the pair I am writing below. I have also around 7k documents (1/2 page long each in average) that need to be parsed according to the REGEX ...
1
vote
1answer
35 views

Text comparison: spot the differences

I would like to know what would be the best approach to compare two texts and see the differences between them. For example: ...
1
vote
1answer
57 views

How to generate abbrevations from shortend words in medical records

I have text files which contains medical history of a patients and would want to extract information out of it. Basically what want is generate english text of abbrevations,semantic category region,...
1
vote
2answers
63 views

How to improve regex while fetching record dynamically

The data is as follows: COL1 COL2 12 :402:agsh,hhjd,:45:hghgh,gruru,:12:fgh,ghgh,:22:hhhh 57 :42:agshhhjd,:57:hghgh,gruru,:120:fghghgh,:12:hhhhhh I ...
0
votes
1answer
44 views

Clean up a pandas column using regex

I have a Python Pandas dataframe with a column named "codes". This column is very messy and contains the following values: ...
0
votes
1answer
37 views

Remove all characters following a certain character in a column of a dataset

I have a data set like the following, and the first column contains the groupings. However, some are labelled slightly differently. I need to remove all characters following the punctuation used (...