Skip to main content

Hi there, can anyone please help me how can I filter some record that have a particular word. For example, I would like to filter all the road name starts with 'The ' (e.g. The Meadow but not like 'Theodor road'. If I use contains/begins with in the tester, it gives me all that have string part 'The'. I never used Regex editor. A good response will be highly appreciated. Thanks in advance.

The tester really should work for this. You need to use the begins with option on the tester and the test clause should be "The " (with a space behind it). That way you will only get The Meadow and not Theodor road.


The tester really should work for this. You need to use the begins with option on the tester and the test clause should be "The " (with a space behind it). That way you will only get The Meadow and not Theodor road.

Thank you very much for @birgit​ for showing the catch :)


There are some cases where the "begins with" option will miss valid strings. You can use the regex:

(^| )the($| )

The code above is saying, find the string 'the' where it is preceeded by a space or its the start of the line and where its followed by a space or the end of the line

 

https://rubular.com/r/jKibYVEqV7Z5QY


There are some cases where the "begins with" option will miss valid strings. You can use the regex:

(^| )the($| )

The code above is saying, find the string 'the' where it is preceeded by a space or its the start of the line and where its followed by a space or the end of the line

 

https://rubular.com/r/jKibYVEqV7Z5QY

Thanks a lot @hkingsbury​. For me, its worked same as like Begins with as suggested in the first comment. Much appreciated! 


Reply