Ok, with duplicates and date formats. Note that the date formats only check 
for the format. You could still create
nonsensical dates that actually match the formats (Jan 55 9999, 
1111.15.55). Actual validation of dates would take
real code massaging.

<$vars digonly="^[0-9]*$">
<$vars useme=<<digonly>>>
</$vars>
</$vars>

<$select tiddler="myregexp">
<option value="^[0-9]*$">Only digits</option>
<option value="^[a-z]*$">Only lower case</option>
<option value="^[A-Z]*$">Only upper case</option>
<option value="^[\w-_]*$">Only alphanumeric, _, and -</option>
<option value="^[\w]{3,15}$">Only alphanum len 3-15</option>
<option value="^[A-Z]+.*$">Starts with capital</option>
<option value="^[0-9]+.*$">Starts with digit</option>
<option value="^.+\.[a-zA-Z]{3,4}$">Extensions only</option>
<option value="^.+(\.jpg|\.gpeg)$">Extension jpg gpeg</option>
<option value="^\b(\w{2,})\b.*\b\1\b.*$">Duplicate words</option>
<option value="^\b(\w{2,})\b.*\b\1\b.*$">Duplicate words</option>
<option value=
"^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s{1}\d{2}\s\d{4}$">Date 
like Jan 06 2019</option>
<option value="^\d{4}\.[0-1]\d\.[0-3]\d$">Date like 2019.08.25</option>
</$select>

<$list filter="[regexp{myregexp}sort[]]">

</$list>



On Friday, August 23, 2019 at 12:11:07 AM UTC-7, Mohammad wrote:
>
> I am looking for examples and use cases of regexp in Tiddlywiki!
> Those can be done current filter operators like prefix, search,... are not 
> recommend to be done with regexp.
>
> I appreciate your help, case and examples on this. Just give what you want 
> to do.
>
> Some case
>
> Give a regexp pattern in Tiddlywiki to match all tiddlers name are
>
>
>    1. only digits
>    2. only lowercase letters
>    3. only uppercase letters
>    4. only alphanumeric and underscore and hyphen
>    5. only alphanumeric with length between 3 and 15
>    6. start with a capital letter
>    7. start with a digit
>    8. have a extension like mytiddler.ext
>    9. have jpg or jpeg extension like *mytiddler.jpg* or *mytiddler.gpeg*
>    10. are a date in format like Jan 06 2019 
>    11. are a date in format like 2019.08.25 
>    12. have duplicate words
>    13. have a valid url
>    14. 
>    
>
> [This list will grow by more examples]
>
>
> Please give your use case.
>
> -- Mohammad
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f2d0128e-03ff-4a6a-a296-aedf5149f6ba%40googlegroups.com.

Reply via email to