regexp-replace Questions

3

Solved

I was wondering if someone could help me understand how to use Hive's regexp_replace function to capture groups in the regex and use those groups in the replacement string. I have an example probl...
Rehabilitation asked 18/2, 2015 at 19:26

4

Solved

I'm trying to extract the number of times a given character is repeated and use it in the string to replace it for. Here's an example : before = c("w","www","answer",&...
Billyebilobate asked 25/4, 2023 at 9:41

1

Solved

I have to mask my email, that is, to replace a few letters with asterisks. Here is my requirement Input — [email protected] Output — **xyz@ify********** Input — [email protected] Output...
Monoatomic asked 19/3, 2023 at 17:52

3

Solved

I worked on the below challenge for about 3 hours and none of my code was working. Decided to look at the solution to understand why I was not working. When I looked at the solution I was confused ...
Polymer asked 16/6, 2021 at 23:7

2

Solved

Im working on Laravel 4.2. Im trying to use Validator to validate a name field with regex, here is my rule below: public static $rules_save = [ 'class_subjects' => 'required|regex:/[0-9]([0-...
Ensemble asked 27/9, 2015 at 16:51

6

My program looks something like this: import re # Escape the string, in case it happens to have re metacharacters my_str = "The quick brown fox jumped" escaped_str = re.escape(my_str) # "The\\ qui...
Squish asked 10/10, 2019 at 17:54

5

Solved

I have a table with a column po_number of type varchar in Postgres 8.4. It stores alphanumeric values with some special characters. I want to ignore the characters [/alpha/?/$/encoding/.] and check...

2

Solved

Looking at pyspark, I see translate and regexp_replace to help me a single characters that exists in a dataframe column. I was wondering if there is a way to supply multiple strings in the regexp_r...
Julissa asked 8/6, 2018 at 18:27

1

Solved

Can I use regexp_replace or some equivalent to replace multiple values in a pyspark dataframe column with one line of code? Here is the code to create my dataframe: from pyspark import SparkContext...
Goodrich asked 22/8, 2020 at 14:34

2

I am pretty new to spark and would like to perform an operation on a column of a dataframe so as to replace all the , in the column with . Assume there is a dataframe x and column x4 x4 1,3435 1,...
Gilliangilliard asked 17/10, 2016 at 7:24

3

I use autohotkey version: 1.0.48.05 (because I stick with activeaid). The script to read the current path is as follows (and worked until Win 7). ; Get full path from open Explorer window WinGetT...
Recuperate asked 31/8, 2016 at 15:11

4

Solved

I have a database table (Oracle 11g) of questionnaire feedback, including multiple choice, multiple answer questions. The Options column has each value the user could choose, and the Answers column...

4

Solved

I need to convert all lower characters to upper and all upper to lower in some string. For example var testString = 'heLLoWorld'; Should be 'HEllOwORLD' after conversion. What is...
Warfield asked 22/11, 2015 at 3:36

5

I have a data like below with tab limited among them. I have represented them with a view here with t_view as (select '6-21 6-21 6-21 6-21 6-21 6-21 6-21 ' as col from dual union select '6-20 6-2...
Calen asked 7/9, 2015 at 8:27

6

Solved

With T-SQL, I'm trying to find the easiest way to reverse numbers in string. so for string like Test123Hello have Test321Hello. [Before] [After] Test123Hello Test321Hello Tt143 Hello Tt341 Hello 1...
Viv asked 2/6, 2015 at 9:20

3

Solved

I need to select the first X words in a string, where x can be any number from 0-100. Is there an easy way to do this? I found the following example to select the first 2 words from a string: sele...
Suboceanic asked 3/6, 2015 at 12:53

2

Solved

Just as the title states, I'm not the best w/ regex, so can anyone provide the appropriate regex for the following: UPDATE table SET column = REGEXP_REPLACE(column, {regex}, ''''); Basically, I'...
Drucilladrucy asked 14/1, 2015 at 18:4
1

© 2022 - 2024 — McMap. All rights reserved.