Questions tagged [regex]
For questions about using regular expression (regex or regexp) in Joomla development. Regex is a sequence of characters that define a search pattern for use in pattern matching with strings, like "find and replace" operations.
8 questions
2 votes
1 answer
169 views
Extension update server - targetplatform to support 4.2 and later
I want my extension to support Joomla 4.2 and later, what should I write for the targetplatform in that case? Will 4.* do the trick? Writing something like 4.[2|3] for the targetplatform is not a good ...
1 vote
1 answer
111 views
Mysqli query with regex to Joomla php syntax
// CODE1 (Mysql (MariaDB 10.8.3) query): SELECT s.`p_p`, COUNT(REGEXP_SUBSTR(r.`xml`, '[0-9]+')) FROM `#__s` AS s, `#__p` AS x, `#__v` AS r WHERE REGEXP_SUBSTR(r.`xml`, '[0-9]+') = [user_id] AND s.`...
8 votes
1 answer
262 views
Joomla extension update 3.x and 4.x
I have an update server for my extensions, which targets Joomla 3.8 and 3.9 <targetplatform name="joomla" version="3.[89]"/> With the release of Joomla 3.10 and 4.0 coming ...
0 votes
0 answers
120 views
Redirect administrator login page of multiple Joomla websites hosted in Apache server
I have around 10 Joomla websites hosted on Apache server. The admin URLs are similar to below patterns. http://m1.aa.example.com/administrator http://m2.aa.example.com/administrator . ...
0 votes
1 answer
152 views
Hikashop, extract text after read more
I want to have the introtext and then the rest of the text in Hikashop product details page. So in the product description I insert the <hr id="system-readmore" /> to separate the introtext and ...
2 votes
1 answer
476 views
Joomla 2.5 email validation issue
There seems to be a major issue on several v2.5.7 sites I've been asked to help with, where emails are not being validated when entered into the built-in com_contact component on a standard contact-us ...
1 vote
2 answers
366 views
How to query a table column for values that start with a non-alphabetic character?
How can rows starting with non alphabetic characters (all "special" characters, including spaces and underscores) be selected? I don't know if it changes anything, but my_table will also contain ...
6 votes
2 answers
2k views
How to use a regex to validate a FormField?
Is there a way to simply validate a form field with a regular expression? I thought about something like this: <field name="firstname" type="text" label="Firstname" validate="regex" regex="...