What regex would allows text or num开发者_如何学运维bers, or text and number (with no spaces) and a maximum length of 255 characters?
You want something like:
^[a-zA-Z0-9]{,255}$
^ matches the beginning of the string [a-zA-Z0-9] matches an alpha numeric character {,255} means up to 255 of the previous part (alpha numeric character) $ matches the end of the string
If your regex flavor knows Unicode, you can use
^[\p{L}\p{N}]{0,255}$
You can also use
^\w{0,255}$
although that will miss non-ASCII letters in some regex flavors, and it will also allow the underscore _. If you don't want that, try 
^[^\W_]{0,255}$
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论