Questions tagged as 'regex'

1
answer

HIVE - Error: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement

Very good. The first thing I have to say is that I am a first-time user of Hive, so my mistake may be a beginner's mistake. My problem is this: This is trying to create a table with five columns (game-clock, time, game-event, shot-clock, loca...
asked by 08.03.2017 / 17:23
2
answers

Separate a URL in its parts

I am trying to write a method that is called separarURL() , that receives a string of characters from a URL and returns an array of three Strings, containing the protocol, the server and the resource of the received URL. Example:   ...
asked by 16.01.2018 / 16:04
1
answer

Find complete words in a string that may or may not be surrounded by "_"

I'm passing two lists for a class DictionaryMaker() . This will generate a match between words of the item of one list with the item of the other, in order to declare each item as a key and value. The class and the method work for me, b...
asked by 28.06.2017 / 18:54
4
answers

Delete text after ==

A requirements file pip contains all the packages installed in Python, so that the file can be used elsewhere and rebuild the original programming environment. A requirements file looks like this: alabaster==0.7.9 arrow==0.8.0 awesome-slu...
asked by 10.03.2017 / 20:26
1
answer

My question is related to regular expressions in Java [closed]

my problem comes with the following code: private void _loadInfo(String sFile){ InfoCategory categoria = null; String linea; String regex = "^\[\d{3}(-\d{4}){1,2}\]$"; // [XXX-XXXX] o [XXX-XXXX-XXXX] String codCategoria = nul...
asked by 10.02.2018 / 13:16
1
answer

Regex for split () in javascript

I'm trying to make a pattern that separates a text if it finds one of the following characters: +, -, x, /,. I tried with the following code but it does not work, could someone help me? var texto = "Hol+A q-ue txal e/st.as"; var separa...
asked by 25.10.2018 / 13:06
4
answers

Remove virus in wordpress with SED in a vps with linux

I have a vps with more than 100 wordpress installations and they all have a script in their header or header.php var _0xfcc4=["\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x47\x45\x54","\x6F\x70\x65\x6E","\x73\x65\x6E\x64","\x72\x65\x73...
asked by 28.09.2018 / 16:03
2
answers

re.search does not read all matches

I am making a regular expression to find all the words in a sentence. I have the following: import re emoji_pattern = re.compile('[A-Za-z]+') print(emoji_pattern.search("jajaja que haces?")) But when I run it, it gives me <_sre.SRE_...
asked by 07.03.2018 / 05:18
1
answer

Separately capture sections that have a name, but do not match the next section

Text: I have the following text (where the match's will be made): Header 1 Codigo : c001 Nombre : Juan Total : 45,78 Header 1 c001 Nombre : Juan Cantidad : 23 Subtotal : 45.89 Total : 3410.67 Header 1 Codigo : c002 Nombre : Ana Tot...
asked by 22.03.2018 / 04:32
2
answers

Delete two or more blank spaces regular expression

I need your help because I have a regular expression to delete two or more blank spaces, but I have tried in several ways and I can not get the expected result, you can guide me please. Case No. 1 String texto = " 95716 B VO 21513836...
asked by 18.08.2018 / 20:04