Regex working in php 7.4 but not with mariadb 10.3.38 (though both use pcre)

I’m currently migrating a very old typo3 cms to wordpress 6.1. In order to get links stored in the db working I have to transform them from a proprietary non-xml format to html using a regular expression: <link fileadmin/user_upload/file47.pdf – download>Linktext</link> has to transformed with this regex <link\s(fileadmin\S*?)[>\s].+?>(.+?)<\/link> to this link: <a href="fileadmin/user_upload/file47.pdf">Linktext</a> I’ve tested… Read More Regex working in php 7.4 but not with mariadb 10.3.38 (though both use pcre)

REGEXP to use for String formatting to group characters and numbers separated with spaces

Hello I am trying to format a given string so that it groups numbers and characters and puts spaces ‘ ‘ in between. For example the given string: 01ABC23fg98 should give the output: 01 ABC 23 fg 98 Any suggestions? I tried REGEXP_REPLACE(input_String , ‘ ‘, ”) which does the opposite (it removes spaces in… Read More REGEXP to use for String formatting to group characters and numbers separated with spaces

Google App Scripts – Regex – Remove all letters, replace all spaces, or new lines with comma not working

INTRO I have a Google App Script Web App which has a form which contains a TextArea, and when submitted saves the data in a Google Sheet. This text-area collects Employee ID’s and will receive input from non-tech savvy users. The users may use the following formats when entering the ID’s into the textarea, including… Read More Google App Scripts – Regex – Remove all letters, replace all spaces, or new lines with comma not working

I want to replace the words in description with dataframe from my column and add it to my dataframe

I want to replace the name and age in description with the data in my table. data = {‘name’ : [‘Max’,’Jim’],’Age’:[32,44],’desc’:”} desc = "My name is <name> and my age is <age>." Like this, Output: name Age desc 0 Max 32 My name is Max and my age is 32. 1 Jim 44 My name… Read More I want to replace the words in description with dataframe from my column and add it to my dataframe

Delete or replace all character inside # in python

I want to remove all character inside of # in text. This is the regex I used. text = text.replace(‘\xa0’, ‘ ‘) text = re.sub(r"#\ [A-Za-z]*\# ", " ", text) text = re.sub(r"#[A-Za-z]*\# ", " ", text) example of data like: ‘Please direct all communications to the HR Department within Refined Resources (#URL_80d75e0d07ca8b108539318a0443bfe5d1ff472afa0c4540b77079c5d5f31eee#)\xa0#EMAIL_0b13a2cfd4718ce252c09b2353d692a73bd32552e922c5db6cad5fb7e9a2c6c3#Darren Lawson |… Read More Delete or replace all character inside # in python

Replace ")" by ") " if the parenthesis is followed by a letter or a number using regex

import re input_text = "((PL_ADVB)dentro ). ((PL_ADVB)ñu)((PL_ADVB) 9u)" input_text = re.sub(r"\s*\)", ")", input_text) print(repr(input_text)) How do I make if the closing parenthesis ) is in front of a letter (uppercase or lowercase) it converts the ) to ), so that the following output can be obtained using this code… "((PL_ADVB) dentro). ((PL_ADVB) ñu)((PL_ADVB) 9u)" >Solution… Read More Replace ")" by ") " if the parenthesis is followed by a letter or a number using regex

Regular expression to remove a portion of text from each entry in commas separated list

I have a string of comma separated values, that I want to trim down for display purpose. The string is a comma separated list of values of varying lengths and number of list entries. Each entry in the list is formatted as a five character pattern in the format "##-NX" followed by some text. e.g.,… Read More Regular expression to remove a portion of text from each entry in commas separated list

How can I remove square bracket using regexp in postgresql

my_Query – SELECT (regexp_matches(‘datavalue=Document{{value=[5]}}’, ‘datavalue=Document{{value=([^d}},”]+)’))[1] response; current output is square bracket – [5] I require without square bracket – 5 >Solution : To extract a part of a string based on a regex, substring() is the better alternative: substring(‘datavalue=Document{{value=[5]}}’ from ‘datavalue=Document{{value=\[([0-9]+)\]}}’) response;