Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Perl expresion /.*/ bug on field type textarea?

  • NicoFaaij
  • NicoFaaij
  • OFFLINE
  • Posts: 114
  • Thanks: 10
  • Karma: 1
13 years 11 months ago #150895 by NicoFaaij
Hi,

I use a 250 character textfield where users can write a introduction about themself, which is shown on the list view.

Now some users enters a newline in that textfield and mess up the list view by making their block very heigh. It should not work as I use the Authorized input Perl expresion /.*/ This should allow anything except a newline. But however, giving an enter still result in a newline.

Does somebody know how to avoid newline's in a field type "textfield"?

Thanks in advance,
Nico

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
13 years 11 months ago - 13 years 11 months ago #150904 by krileon
In REGEX "." means anything, line-break, special characters.. anything. You can review more on regex at the following URL.

www.regular-expressions.info/tutorial.html

You should configure it to use Multiple words with spacing to achieve what you're wanting.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 13 years 11 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • NicoFaaij
  • NicoFaaij
  • OFFLINE
  • Posts: 114
  • Thanks: 10
  • Karma: 1
13 years 11 months ago - 13 years 11 months ago #150910 by NicoFaaij
Thank for your quick responce but see also on that site www.regular-expressions.info/dot.html in the second/third line stands

The dot matches a single character, without caring what that character is. The only exception are newline characters. In all regex flavors discussed in this tutorial, the dot will not match a newline character by default. So by default, the dot is short for the negated character class [^\n] (UNIX regex flavors) or [^\r\n] (Windows regex flavors).


Do you know another regular expression to avoid newline/returns?
Last edit: 13 years 11 months ago by NicoFaaij.

Please Log in or Create an account to join the conversation.

  • NicoFaaij
  • NicoFaaij
  • OFFLINE
  • Posts: 114
  • Thanks: 10
  • Karma: 1
13 years 11 months ago - 13 years 11 months ago #151375 by NicoFaaij
Can you please tell my how?

You should configure it to use Multiple words with spacing to achieve what you're wanting.

I still not able to avoid, or even better remove, line-breaks in a CB Textfield? Can you help my?

Many thanks in advance,
Nico
Last edit: 13 years 11 months ago by NicoFaaij.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum