ee.Image.regexpRename
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
با اعمال یک عبارت معمولی به نام باندهای فعلی، نوارهای یک تصویر را تغییر نام می دهد. هر باندی که با regex مطابقت نداشته باشد بدون تغییر نام کپی می شود.
استفاده | برمی گرداند | Image. regexpRename (regex, replacement, all ) | تصویر |
استدلال | تایپ کنید | جزئیات | این: input | تصویر | تصویر حاوی باندهایی برای تغییر نام است. |
regex | رشته | یک عبارت منظم برای مطابقت در نام هر گروه. |
replacement | رشته | متنی که با آن هر مسابقه جایگزین شود. از دستور $n برای مقادیر گرفته شده پشتیبانی می کند. |
all | بولی، پیش فرض: درست است | اگر درست باشد، تمام موارد منطبق در یک رشته معین جایگزین خواهند شد. در غیر این صورت، فقط اولین مسابقه در هر رشته جایگزین خواهد شد. |
،با اعمال یک عبارت معمولی به نام باندهای فعلی، نوارهای یک تصویر را تغییر نام می دهد. هر باندی که با regex مطابقت نداشته باشد بدون تغییر نام کپی می شود.
استفاده | برمی گرداند | Image. regexpRename (regex, replacement, all ) | تصویر |
استدلال | تایپ کنید | جزئیات | این: input | تصویر | تصویر حاوی باندهایی برای تغییر نام است. |
regex | رشته | یک عبارت منظم برای مطابقت در نام هر گروه. |
replacement | رشته | متنی که با آن هر مسابقه جایگزین شود. از دستور $n برای مقادیر گرفته شده پشتیبانی می کند. |
all | بولی، پیش فرض: درست است | اگر درست باشد، تمام موارد منطبق در یک رشته معین جایگزین خواهند شد. در غیر این صورت، فقط اولین مسابقه در هر رشته جایگزین خواهد شد. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eApplies a regular expression to rename image bands, leaving unmatched bands unchanged.\u003c/p\u003e\n"],["\u003cp\u003eOffers flexibility to replace all regex matches or only the first match in each band name using the \u003ccode\u003eall\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eUses \u003ccode\u003e$n\u003c/code\u003e syntax in the 'replacement' argument to utilize captured values from the regex.\u003c/p\u003e\n"],["\u003cp\u003eOperates directly on the provided input image and returns a modified image with the renamed bands.\u003c/p\u003e\n"]]],["This functionality renames image bands using regular expressions. It takes an image, a `regex` to match band names, and a `replacement` string (supporting captured groups via `$n`). Bands not matching the `regex` remain unchanged. An optional `all` parameter (defaulting to `true`) determines whether to replace all regex matches or just the first one per band name. The function returns a new image with the updated band names.\n"],null,["# ee.Image.regexpRename\n\nRenames the bands of an image by applying a regular expression replacement to the current band names. Any bands not matched by the regex will be copied over without renaming.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------|---------|\n| Image.regexpRename`(regex, replacement, `*all*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| this: `input` | Image | The image containing the bands to rename. |\n| `regex` | String | A regular expression to match in each band name. |\n| `replacement` | String | The text with which to replace each match. Supports $n syntax for captured values. |\n| `all` | Boolean, default: true | If true, all matches in a given string will be replaced. Otherwise, only the first match in each string will be replaced. |"]]