I made a thread yesterday about REGEX
>>169721
I still need some help actually
My filter (I took the complicated one that excludes alphabetic characters instead of allowing space, nice) works well in every situation except when the wanted word is at the beginning or the end of the sentence, or alone in the post (I guess since it doesn't spot any non-alpha character it doesn't match).
Can you think of a way to make it work for such situations?
>>>/a/145358678
seems relevant: http://www.regular-expressions.info/wordboundaries.html
try this maybe (I don't use 4chanx so haven't tested it):
\<[aA][rR][iI][aA]\>
or: if none of the word-boundary tokens work, you could use multiple filters:
^[aA][rR][iI][aA]$
^[aA][rR][iI][aA][^A-Za-z]
[^A-Za-z][aA][rR][iI][aA][^A-Za-z]
[^A-Za-z][aA][rR][iI][aA]$
>>170662
Okay thanks, the multiple filters work, although that's a bit of a pain to use with multiple words
The word boundary doesn't seem to work unfortunately
Thanks again for the research I made you do, also those caps variation must not be easy to write
4 words: Keep It Simple, Stupid
/[^a-z]aria[^a-z]/i
>>170673
Yeah I used that as I tweaked the "complicated" version, it works (much easier than to do the brackets caps thing)
I nearly forgot that it worked actually, it'll be much easier to use the 4 filters for one word now, thanks
/^aria$/i
/^aria[^A-Za-z]/i
/[^A-Za-z]aria[^A-Za-z]/i
/[^A-Za-z]aria$/i
that does the job, thanks