background-image URL

Published on Tue Mar 01 2022

regex to fetch the URL of the background-image CSS-Propertie

Additional matching regexes for
background-image URL

background-image URL

regex to fetch the URL of the background-image CSS-Propertie

import url image

import url image

HTML image tag src

Capture src attribute of HTML image tags

To search for a image tag

This pattern would select the whole image tag

Proper-case word separator

Takes a string like 'ImageEditHRStuffSomeMOREStuff' and produces -> 'Image Edit HR Stuff Some MORE Stuff'

Fetch data between curly braces with plain text

This regex fetch only the data between content in curly braces (first occurrence, use preg_match_all in php, for all occurrences). This is useful for bad JSON files with wrong format or text between.

group & access several lines

Hi there, I try to learn and improve my regex knowledge... I want to fetch all lines below the "="-line and between the "-"-lines and access them via $1 - $n. Is this possible? Or should I fetch the whole string below the "="-line and the last "-"-line, then seperate the lines after that in another regexp? How can I find the end then? Thank you in advance for your help.

Fetch "text A (text B)" or "text A (text B (text C))"

How do I extract then some text A, some text B and some text C if they are in the format some text A ( some text B ( some text C)) Please mind that in some cases may be only some text A ( some text B)

question regarding "split" like regex group

dear all, i am a regex beginner, so please be gentle :) we have lines of log contents delimited by a pipe char. is it possible to fetch the content between the 5th and the 6th delimiter, ignoring the values in between? example log line: 2014-05-21_06:50:59||-|-|-|GET|/home.html|-|6 I'd like to do something like result = line.split('|')[6]. unfortunatelly I can't write code but only a regex selector. help is highly appreciated.

Remove _1 suffix from image filenames

Remove autogenerated file name suffixes from images whilst preserving the extension (e.g. .jpg) These suffixes are usually added when filename already exists in the directory an image is being saved to by an application. Magento is a fine example of a system that does this.