Questions tagged as 'regex'

1
answer

How to get the characters of a record composed of several columns with awk? [closed]

I have a file with more than 1000 records which come from this way: AAAA 100141167 100141167 100141167 60000000069615260000000026093000000000495700000000310500000000031050B/V ESAC 00100 100021110...
asked by 04.07.2018 / 21:16
1
answer

Exception in thread "main" java.lang.IllegalStateException: No match found at java.util.regex.Matcher.group (Unknown Source)

From the line D:\csv\rssi_data_upload_00_11_74_86_49_7F_1519231770 I need to execute the regular expression upload_(.+)_[0-9]+ to obtain the value of 00_11_74_86_49_7F . This is my code: public static void main(String[] args...
asked by 11.03.2018 / 06:48
2
answers

Regular expression

I would like to see how I can obtain a regular expression to get the result in brackets without considering the sub brackets, I will explain with an example let txt = F[aaa(0,0,0)] otra texto F[bbb(1,1,1)] let regExp = /F\[([^\]]+)\]/g; let ma...
asked by 11.05.2018 / 22:05
1
answer

Delete except when there is a keyword

I try to delete all the numbers in the text, except if they are preceded by the word hospital . I have: data<-c("3l hospital 11 esta a la vu3lt4") data<- gsub("\b(?![hospital])\s[0-9]|[0-9]", "", data, perl = T) and my resu...
asked by 12.01.2018 / 05:16
1
answer

Capture text within quotation marks within tag

I want to make a match to any text between quotes that is between a couple of specific tags, for example Code: codigo cualquiera 1 [begin] "hola" <--- match a este 123 hola "hola" <-- math a este otro [end] [otro] "hola" &...
asked by 01.11.2017 / 22:56
2
answers

Remove tag p only when it contains figureimg / figure

I have these labels <p><figure><img src="xxxx"></figure></p> and I would like to change them for this, that is, remove the <p></p> <figure><img src="xxxx"></figure> but...
asked by 15.01.2018 / 22:07
1
answer

Replace text except in divs of a class with regular expression

I need a regular expression that replaces a text that is outside a certain div. Example: <div class="try">foo</div> <div>foo</div> foo <span>foo</span> The output should be when replacing foo by bar:...
asked by 25.03.2017 / 13:36
1
answer

How to add one diagonal after another, in an automated way?

What I would like to do is to be able to add a double diagonal every time there is a simple diagonal within my url that I get since my original purpose is to save the address of an image in my database but it only saves one point And not all the...
asked by 13.02.2017 / 19:14
1
answer

Save parts of a String to variables using regular expressions

I need to save parts of a String in different variables using a single regular expression, the string is the following and it can vary, but the structure will always be the same (this line is stored in the variable strLineProcess): Skype.exe p...
asked by 09.02.2017 / 13:29
1
answer

Regular expression that matches a range of hours within a string

I would like to know if it is possible, through a regular expression, with a string containing the date and time, to know if the time is within a given range. For example: 2016-10-17T08:44:04.000+0000 I would like to know if the time wit...
asked by 07.11.2016 / 13:15