I have a table and I want to trim the values for one field, such that all characters from the first digits onwards are removed
for example:
"dadmin01ldk" will be trimmed to "dadmin"
"rusl90" will be trimmed to "rusl",I have a table with a field.
I want to trim all characters starting at the first digit.
For example, "dadmin02yut" will be trimmed into "dadmin"
Try this regex-
|rex field=<yourfieldname> "^(?<String>[A-Za-z]+)"
It will trim and store result in String field
this works!
thank you!
Try this, which captures all non-digits from the start of the field (replace 'yourfield' with the actual fieldname from your table):
| rex field=yourfield "^(<yourfield>\D+)"
could not get it to work
table clienthost | rex field=clienthost "^(\D+)"
@sshahmoon, FYI, Above rex works too. However, ? is missing in that regex. Try this,
| rex field=yourfield "^(?<yourfield>\D+)"
Thanks,
Sandeep
Ah, yes, my bad. Thanks for the correction.
could not get it to work
table clienthost | rex field=clienthost "^(\D+)"